[jboss-remoting-commits] JBoss Remoting SVN: r4492 - remoting2/branches/2.x/src/main/org/jboss/remoting/marshal.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Sun Aug 10 19:06:17 EDT 2008


Author: ron.sigal at jboss.com
Date: 2008-08-10 19:06:17 -0400 (Sun, 10 Aug 2008)
New Revision: 4492

Modified:
   remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderClient.java
Log:
JBREM-1023: Gets "serializationtype" from InvokerLocator.

Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderClient.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderClient.java	2008-08-10 23:00:26 UTC (rev 4491)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/marshal/MarshallerLoaderClient.java	2008-08-10 23:06:17 UTC (rev 4492)
@@ -54,10 +54,27 @@
       Marshaller marshaller = null;
       try
       {
-         Marshaller loaderMarshaller = new SerializableMarshaller();
-         UnMarshaller loaderUnMarshaller = new SerializableUnMarshaller();
+         SerializableMarshaller loaderMarshaller = new SerializableMarshaller();
+         SerializableUnMarshaller loaderUnMarshaller = new SerializableUnMarshaller();
          loaderUnMarshaller.setClassLoader(classByteLoader);
-
+         
+         String serializationType = "java";
+         Map parameters = loaderLocator.getParameters();
+         if (parameters != null)
+         {
+            Object o = parameters.get(InvokerLocator.SERIALIZATIONTYPE);
+            if (o == null)
+            {
+               o = parameters.get(InvokerLocator.SERIALIZATIONTYPE_CASED);;
+            }
+            if (o != null)
+            {
+               serializationType = (String) o;
+            }
+         }
+         loaderMarshaller.setSerializationType(serializationType);
+         loaderUnMarshaller.setSerializationType(serializationType);
+         
          String marshallerMethodName = GET_MARSHALLER_METHOD;
          Map metadata = new HashMap();
          metadata.put(InvokerLocator.DATATYPE, dataType);
@@ -104,6 +121,23 @@
          SerializableMarshaller loaderMarshaller = new SerializableMarshaller();
          SerializableUnMarshaller loaderUnMarshaller = new SerializableUnMarshaller();
          loaderUnMarshaller.setClassLoader(classByteLoader);
+         
+         String serializationType = "java";
+         Map parameters = loaderLocator.getParameters();
+         if (parameters != null)
+         {
+            Object o = parameters.get(InvokerLocator.SERIALIZATIONTYPE);
+            if (o == null)
+            {
+               o = parameters.get(InvokerLocator.SERIALIZATIONTYPE_CASED);;
+            }
+            if (o != null)
+            {
+               serializationType = (String) o;
+            }
+         }
+         loaderMarshaller.setSerializationType(serializationType);
+         loaderUnMarshaller.setSerializationType(serializationType);
 
          String marshallerMethodName = GET_UNMARSHALLER_METHOD;
          Map metadata = new HashMap();




More information about the jboss-remoting-commits mailing list