[Jboss-cvs] JBossAS SVN: r56226 - branches/Branch_4_0/server/src/main/org/jboss/invocation
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 24 15:54:03 EDT 2006
Author: clebert.suconic at jboss.com
Date: 2006-08-24 15:54:02 -0400 (Thu, 24 Aug 2006)
New Revision: 56226
Modified:
branches/Branch_4_0/server/src/main/org/jboss/invocation/InvokerInterceptor.java
Log:
JBAS-3561
Modified: branches/Branch_4_0/server/src/main/org/jboss/invocation/InvokerInterceptor.java
===================================================================
--- branches/Branch_4_0/server/src/main/org/jboss/invocation/InvokerInterceptor.java 2006-08-24 18:07:42 UTC (rev 56225)
+++ branches/Branch_4_0/server/src/main/org/jboss/invocation/InvokerInterceptor.java 2006-08-24 19:54:02 UTC (rev 56226)
@@ -28,6 +28,9 @@
import java.lang.reflect.UndeclaredThrowableException;
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
import javax.transaction.Transaction;
@@ -306,14 +309,45 @@
/** It is too expensive to serialize this entire object just to get class isolation
and MarshalledValues on local calls.
- We are creating an in-memory copy without using serialization for that matter. */
- private MarshalledInvocation createInvocationCopy(Invocation invocation, IMarshalledValue value) {
+ We are creating an in-memory copy without using serialization for that matter.
+ * @throws ClassNotFoundException
+ * @throws IOException */
+ private MarshalledInvocation createInvocationCopy(Invocation invocation, IMarshalledValue value) throws IOException, ClassNotFoundException {
+
+
MarshalledInvocation invocationCopy = new MarshalledInvocation(invocation);
invocationCopy.setMethod(null);
invocationCopy.setMethodHash(MarshalledInvocation.calculateHash(invocation.getMethod()));
invocationCopy.setMarshalledArguments(value);
invocationCopy.setArguments(null);
+
+ InvocationContext copyContext = null;
+ if (invocation.getInvocationContext()!=null)
+ {
+ copyContext = (InvocationContext)createMarshalledValueForCallByValue(invocation.getInvocationContext()).get();
+ }
+ invocationCopy.setInvocationContext(copyContext);
+
+ Map payLoad = invocation.getPayload();
+ Map payloadCopy = new HashMap();
+
+ if (payLoad!=null && payLoad.size()!=0)
+ {
+
+ Iterator keys = payLoad.keySet().iterator();
+ while (keys.hasNext())
+ {
+ Object currentKey = keys.next();
+ Object valueSource = payLoad.get(currentKey);
+
+ payloadCopy.put(currentKey,this.createMarshalledValueForCallByValue(valueSource));
+ }
+ }
+ invocationCopy.payload = payloadCopy;
+
+
+
return invocationCopy;
}
More information about the jboss-cvs-commits
mailing list