JBoss Remoting SVN: r5246 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config: WEB-INF and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-16 19:47:03 -0400 (Sat, 16 May 2009)
New Revision: 5246
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF/
Removed:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF/
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF/web.xml
Log:
JBREM-1102: Broke org.jboss.tests.remoting.transport.servlet.marshal into ...marshal.config and ...marshal.noconfig.
Copied: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF (from rev 5183, remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF)
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF/web.xml 2009-05-10 06:42:11 UTC (rev 5183)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF/web.xml 2009-05-16 23:47:03 UTC (rev 5246)
@@ -16,7 +16,7 @@
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
<param-name>locatorUrl</param-name>
- <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?marshaller=org.jboss.test.remoting.marshall.config.ConfigTestMarshaller&unmarshaller=org.jboss.test.remoting.marshall.config.ConfigTestUnmarshaller</param-value>
+ <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet</param-value>
<description>The servlet server invoker locator url</description>
</init-param>
<load-on-startup>1</load-on-startup>
13 years, 10 months
JBoss Remoting SVN: r5245 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal: noconfig and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-16 19:15:30 -0400 (Sat, 16 May 2009)
New Revision: 5245
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/ServletConfigurationMapTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/remoting-servlet-service.xml
Removed:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ServletConfigurationMapTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml
Log:
JBREM-1102: Broke org.jboss.tests.remoting.transport.servlet.marshal into ...marshal.config and ...marshal.noconfig.
Deleted: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ServletConfigurationMapTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ServletConfigurationMapTestClient.java 2009-05-16 23:15:09 UTC (rev 5244)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ServletConfigurationMapTestClient.java 2009-05-16 23:15:30 UTC (rev 5245)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.remoting.transport.servlet.marshal;
-
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.jboss.test.remoting.marshall.config.ConfigurationMapTestParent;
-
-/**
- * Unit tests for JBREM-1102.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version
- * <p>
- * Copyright Mar 21, 2009
- * </p>
- */
-public class ServletConfigurationMapTestClient extends ConfigurationMapTestParent
-{
- protected static Logger log = Logger.getLogger(ServletConfigurationMapTestClient.class);
-
- public void testDatatypeConfig() throws Throwable
- {
- log.info("skipping " + getName());
- }
-
- protected int configTestMarshallerCount()
- {
- return 1;
- }
-
- protected int configTestUnmarshallerCount()
- {
- return 1;
- }
-
- protected String getTransport()
- {
- return "servlet";
- }
-
- protected void setupServer(String parameter, Map extraConfig) throws Exception
- {
- locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?" +
- "marshaller=org.jboss.test.remoting.marshall.config.ConfigTestMarshaller&" +
- "unmarshaller=org.jboss.test.remoting.marshall.config.ConfigTestUnmarshaller";
-
- log.info("setting InvokerLocator to " + locatorURI);
- }
-}
-
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/ServletConfigurationMapTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/ServletConfigurationMapTestClient.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/ServletConfigurationMapTestClient.java 2009-05-16 23:15:30 UTC (rev 5245)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.remoting.transport.servlet.marshal.noconfig;
+
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.test.remoting.marshall.config.ConfigurationMapTestParent;
+
+/**
+ * Unit tests for JBREM-1102.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Mar 21, 2009
+ * </p>
+ */
+public class ServletConfigurationMapTestClient extends ConfigurationMapTestParent
+{
+ protected static Logger log = Logger.getLogger(ServletConfigurationMapTestClient.class);
+
+ public void testDatatypePassConfigMapTrue() throws Throwable
+ {
+ log.info("skipping " + getName());
+ }
+
+ public void testFQNConfigPassConfigMapTrue() throws Throwable
+ {
+ log.info("skipping " + getName());
+ }
+
+ protected int marshallerCountDatatype()
+ {
+ return 2;
+ }
+
+ protected int unmarshallerCountDatatype()
+ {
+ return 2;
+ }
+
+ protected int marshallerCountFQN()
+ {
+ return 1;
+ }
+
+ protected int unmarshallerCountFQN()
+ {
+ return 1;
+ }
+
+ protected int marshallerDatatypeUnused()
+ {
+ return 0;
+ }
+
+ protected int marshallerFQNUnused()
+ {
+ return 0;
+ }
+
+ protected String getTransport()
+ {
+ return "servlet";
+ }
+
+ protected void setupServer(String parameter, Map extraConfig) throws Exception
+ {
+ locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?" + parameter;
+// "marshaller=org.jboss.test.remoting.marshall.config.ConfigTestMarshaller&" +
+// "unmarshaller=org.jboss.test.remoting.marshall.config.ConfigTestUnmarshaller";
+
+ log.info("setting InvokerLocator to " + locatorURI);
+ }
+}
+
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/remoting-servlet-service.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/remoting-servlet-service.xml 2009-05-16 23:15:30 UTC (rev 5245)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,target=tests"
+ display-name="Servlet transport Connector">
+
+ <attribute name="InvokerLocator">
+ servlet://localhost:8080/servlet-invoker/ServerInvokerServlet
+ </attribute>
+
+ <attribute name="Configuration">
+ <config>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.marshall.config.TestInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+
+
+</server>
Deleted: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml 2009-05-16 23:15:09 UTC (rev 5244)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml 2009-05-16 23:15:30 UTC (rev 5245)
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
-
- <mbean code="org.jboss.remoting.transport.Connector"
- name="jboss.remoting:service=Connector,transport=Servlet,target=tests"
- display-name="Servlet transport Connector">
-
- <attribute name="InvokerLocator">
- servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?marshaller=org.jboss.test.remoting.marshall.config.ConfigTestMarshaller&unmarshaller=org.jboss.test.remoting.marshall.config.ConfigTestUnmarshaller
- </attribute>
-
- <attribute name="Configuration">
- <config>
- <handlers>
- <handler subsystem="test">org.jboss.test.remoting.marshall.config.TestInvocationHandler</handler>
- </handlers>
- </config>
- </attribute>
- </mbean>
-
-
-</server>
13 years, 10 months
JBoss Remoting SVN: r5244 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal: config and 1 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-16 19:15:09 -0400 (Sat, 16 May 2009)
New Revision: 5244
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/ServletConfigurationMapTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/remoting-servlet-service.xml
Log:
JBREM-1102: Broke org.jboss.tests.remoting.transport.servlet.marshal into ...marshal.config and ...marshal.noconfig.
Copied: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/ServletConfigurationMapTestClient.java (from rev 4902, remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/ServletConfigurationMapTestClient.java)
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/ServletConfigurationMapTestClient.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/ServletConfigurationMapTestClient.java 2009-05-16 23:15:09 UTC (rev 5244)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.remoting.transport.servlet.marshal.config;
+
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.test.remoting.marshall.config.ConfigurationMapTestParent;
+
+/**
+ * Unit tests for JBREM-1102.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Mar 21, 2009
+ * </p>
+ */
+public class ServletConfigurationMapTestClient extends ConfigurationMapTestParent
+{
+ protected static Logger log = Logger.getLogger(ServletConfigurationMapTestClient.class);
+
+ public void testDatatypeConfigDefault() throws Throwable
+ {
+ log.info("skipping " + getName());
+ }
+
+ public void testDatatypePassConfigMapFalse() throws Throwable
+ {
+ log.info("skipping " + getName());
+ }
+
+ public void testFQNConfigDefault() throws Throwable
+ {
+ log.info("skipping " + getName());
+ }
+
+ public void testFQNPassConfigMapFalse() throws Throwable
+ {
+ log.info("skipping " + getName());
+ }
+
+ protected int marshallerCountDatatype()
+ {
+ return 2;
+ }
+
+ protected int unmarshallerCountDatatype()
+ {
+ return 2;
+ }
+
+ protected int marshallerCountFQN()
+ {
+ return 1;
+ }
+
+ protected int unmarshallerCountFQN()
+ {
+ return 1;
+ }
+
+ protected String getTransport()
+ {
+ return "servlet";
+ }
+
+ protected void setupServer(String parameter, Map extraConfig) throws Exception
+ {
+ locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?" + parameter;
+// "marshaller=org.jboss.test.remoting.marshall.config.ConfigTestMarshaller&" +
+// "unmarshaller=org.jboss.test.remoting.marshall.config.ConfigTestUnmarshaller";
+
+ log.info("setting InvokerLocator to " + locatorURI);
+ }
+}
+
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/ServletConfigurationMapTestClient.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF (from rev 5183, remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/WEB-INF)
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/WEB-INF
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/remoting-servlet-service.xml (from rev 4901, remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/remoting-servlet-service.xml)
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/remoting-servlet-service.xml 2009-05-16 23:15:09 UTC (rev 5244)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet,target=tests"
+ display-name="Servlet transport Connector">
+
+ <attribute name="InvokerLocator">
+ servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?marshaller=org.jboss.test.remoting.marshall.config.ConfigTestMarshaller&unmarshaller=org.jboss.test.remoting.marshall.config.ConfigTestUnmarshaller
+ </attribute>
+
+ <attribute name="Configuration">
+ <config>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.marshall.config.TestInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+
+
+</server>
Property changes on: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/config/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:mergeinfo
+
13 years, 10 months
JBoss Remoting SVN: r5243 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-16 19:12:20 -0400 (Sat, 16 May 2009)
New Revision: 5243
Modified:
remoting2/branches/2.2/docs/guide/en/chap5.xml
Log:
JBREM-1102: Added discussion of "passConfigMapToMarshalFactory".
Modified: remoting2/branches/2.2/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-05-16 04:11:23 UTC (rev 5242)
+++ remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-05-16 23:12:20 UTC (rev 5243)
@@ -3155,6 +3155,15 @@
is required (only the ability for the client to access the server on the
specified loader port, so must provide access if running through
firewall).</para>
+
+ <para><emphasis role="bold">Note.</emphasis> Prior to release 2.2.3, only the
+ parameters in the <classname>InvokerLocator</classname> were used to configure
+ marshallers and unmarshallers. As of release 2.2.3 the parameters in the
+ configuration map passed to an <classname>org.jboss.remoting.Client</classname>
+ or <classname>org.jboss.remoting.transport.Connector</classname> will also
+ be used if the parameter
+ <code>org.jboss.remoting.Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY</code>
+ (actual value "passConfigMapToMarshalFactory") is set to "true".</para>
<bridgehead>Compression marshalling</bridgehead>
@@ -6196,6 +6205,13 @@
new "connection identity" semantics described in Chapter
<xref linkend="chapter-connection-failure"/>.</para>
+ <para><emphasis role="bold">PASS_CONFIG_MAP_TO_MARSHAL_FACTORY</emphasis>
+ (actual value "passConfigMapToMarshalFactory") - if set to "true", tells clients and servers
+ to take parameters for configuring marshallers and unmarshallers from the
+ configuration map passed to <classname>Client</classname>s and
+ <classname>Connector</classname>s in addition to the parameters in the
+ <classname>InvokerLocator</classname>.</para>
+
<para></para>
<bridgehead>org.jboss.remoting.ServerInvoker</bridgehead>
13 years, 10 months
JBoss Remoting SVN: r5242 - remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-16 00:11:23 -0400 (Sat, 16 May 2009)
New Revision: 5242
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java
Log:
JBREM-1102: Moved retrieval of value of "passConfigMapToMarshalFactory".
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2009-05-16 04:08:12 UTC (rev 5241)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2009-05-16 04:11:23 UTC (rev 5242)
@@ -162,11 +162,6 @@
{
shouldCheckConnection = true;
}
- checkValue = (String)configMap.get(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY);
- if (checkValue != null && checkValue.length() > 0)
- {
- passConfigMapToMarshalFactory = Boolean.valueOf(checkValue).booleanValue();
- }
}
}
@@ -819,7 +814,19 @@
{
configMap = invoker.getConfiguration();
}
-
+ boolean passConfigMapToMarshalFactory = false;
+ if (configMap != null)
+ {
+ Object o = configMap.get(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY);
+ if (o instanceof String)
+ {
+ passConfigMapToMarshalFactory = Boolean.valueOf((String) o).booleanValue();
+ }
+ else if (o != null)
+ {
+ log.warn("Value of " + Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY + " should be of type String: " + o);
+ }
+ }
Map map = passConfigMapToMarshalFactory ? configMap : null;
if (unmarshaller == null)
{
13 years, 10 months
JBoss Remoting SVN: r5241 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-16 00:08:12 -0400 (Sat, 16 May 2009)
New Revision: 5241
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/BisocketConfigurationMapTestCase.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestUnmarshaller.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigurationMapTestParent.java
Log:
JBREM-1102: Added tests for case in which passing config map is turned off.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/BisocketConfigurationMapTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/BisocketConfigurationMapTestCase.java 2009-05-15 21:52:16 UTC (rev 5240)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/BisocketConfigurationMapTestCase.java 2009-05-16 04:08:12 UTC (rev 5241)
@@ -26,6 +26,7 @@
import org.apache.log4j.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.Remoting;
import org.jboss.remoting.callback.Callback;
import org.jboss.remoting.callback.HandleCallbackException;
import org.jboss.remoting.callback.InvokerCallbackHandler;
@@ -49,7 +50,7 @@
return "bisocket";
}
- public void testDatatypeConfigWithCallbacks() throws Throwable
+ public void testDatatypeConfigWithCallbacksDefault() throws Throwable
{
log.info("entering " + getName());
@@ -80,8 +81,8 @@
client.addListener(callbackHandler, new HashMap());
// Do tests.
- assertTrue(ConfigTestMarshaller.ok(16));
- assertTrue(ConfigTestUnmarshaller.ok(12));
+ assertTrue(ConfigTestMarshaller.ok(false, 4));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
assertTrue(LocatorTestMarshaller.ok());
assertTrue(LocatorTestUnmarshaller.ok());
assertEquals(1, callbackHandler.counter);
@@ -92,12 +93,102 @@
}
- public void testFQNConfigWithCallbacks() throws Throwable
+ public void testDatatypeConfigWithCallbacksPassConfigMapFalse() throws Throwable
{
log.info("entering " + getName());
+ // Cache marshaller/unmarshaller.
+ MarshalFactory.addMarshaller("config", new ConfigTestMarshaller(), new ConfigTestUnmarshaller());
+
// Start server.
HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.DATATYPE, "config");
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.DATATYPE, "config");
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Configure callbacks.
+ TestCallbackHandler callbackHandler = new TestCallbackHandler();
+ client.addListener(callbackHandler, new HashMap());
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(false, 4));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+ assertEquals(1, callbackHandler.counter);
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testDatatypeConfigWithCallbacksPassConfigMapTrue() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Cache marshaller/unmarshaller.
+ MarshalFactory.addMarshaller("config", new ConfigTestMarshaller(), new ConfigTestUnmarshaller());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.DATATYPE, "config");
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.DATATYPE, "config");
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Configure callbacks.
+ TestCallbackHandler callbackHandler = new TestCallbackHandler();
+ client.addListener(callbackHandler, new HashMap());
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(true, 16));
+ assertTrue(ConfigTestUnmarshaller.ok(true, 12));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+ assertEquals(1, callbackHandler.counter);
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testFQNConfigWithCallbacksDefault() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
serverConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
serverConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
setupServer("x=y", serverConfig);
@@ -123,8 +214,8 @@
client.addListener(callbackHandler, new HashMap());
// Do tests.
- assertTrue(ConfigTestMarshaller.ok(8));
- assertTrue(ConfigTestUnmarshaller.ok(6));
+ assertTrue(ConfigTestMarshaller.ok(false, 2));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
assertTrue(LocatorTestMarshaller.ok());
assertTrue(LocatorTestUnmarshaller.ok());
assertEquals(1, callbackHandler.counter);
@@ -135,6 +226,96 @@
}
+ public void testFQNConfigWithCallbacksPassConfigMapFalse() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ serverConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ clientConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Do callback.
+ // Configure callbacks.
+ TestCallbackHandler callbackHandler = new TestCallbackHandler();
+ client.addListener(callbackHandler, new HashMap());
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(false, 2));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+ assertEquals(1, callbackHandler.counter);
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testFQNConfigWithCallbacksPassConfigMapTrue() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ serverConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ clientConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Do callback.
+ // Configure callbacks.
+ TestCallbackHandler callbackHandler = new TestCallbackHandler();
+ client.addListener(callbackHandler, new HashMap());
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(true, 8));
+ assertTrue(ConfigTestUnmarshaller.ok(true, 6));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+ assertEquals(1, callbackHandler.counter);
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
protected TestInvocationHandler getInvocationHandler()
{
return new BisocketTestInvocationHandler();
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java 2009-05-15 21:52:16 UTC (rev 5240)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestMarshaller.java 2009-05-16 04:08:12 UTC (rev 5241)
@@ -52,15 +52,15 @@
public Marshaller cloneMarshaller() throws CloneNotSupportedException
{
cloned++;
- log.info("cloned ConfigTestMarshaller");
// log.info("cloned ConfigTestMarshaller", new Exception());
+// log.info("cloned ConfigTestMarshaller", new Exception());
return new ConfigTestMarshaller();
}
- public static boolean ok(int count)
+ public static boolean ok(boolean b, int count)
{
log.info("wrote: " + wrote + ", cloned: " + cloned);
- return wrote && cloned == count;
+ return wrote == b && cloned == count;
}
public static void reset()
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestUnmarshaller.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestUnmarshaller.java 2009-05-15 21:52:16 UTC (rev 5240)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigTestUnmarshaller.java 2009-05-16 04:08:12 UTC (rev 5241)
@@ -38,7 +38,7 @@
*/
public class ConfigTestUnmarshaller extends SerializableUnMarshaller
{
- protected Logger log = Logger.getLogger(ConfigTestUnmarshaller.class);
+ protected static Logger log = Logger.getLogger(ConfigTestUnmarshaller.class);
private static final long serialVersionUID = 1L;
public static int cloned;
public static boolean read;
@@ -65,9 +65,10 @@
return ((Wrapper)o).wrappee;
}
- public static boolean ok(int count)
+ public static boolean ok(boolean b, int count)
{
- return read && cloned == count;
+ log.info("read: " + read + ", cloned: " + cloned);
+ return read == b && cloned == count;
}
public static void reset()
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigurationMapTestParent.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigurationMapTestParent.java 2009-05-15 21:52:16 UTC (rev 5240)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config/ConfigurationMapTestParent.java 2009-05-16 04:08:12 UTC (rev 5241)
@@ -35,6 +35,7 @@
import org.jboss.logging.XLevel;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.Remoting;
import org.jboss.remoting.marshal.MarshalFactory;
import org.jboss.remoting.transport.Connector;
import org.jboss.remoting.transport.PortUtil;
@@ -88,7 +89,7 @@
}
- public void testDatatypeConfig() throws Throwable
+ public void testDatatypeConfigDefault() throws Throwable
{
log.info("entering " + getName());
@@ -115,8 +116,8 @@
log.info("connection is good");
// Do tests.
- assertTrue(ConfigTestMarshaller.ok(6));
- assertTrue(ConfigTestUnmarshaller.ok(4));
+ assertTrue(ConfigTestMarshaller.ok(false, 2));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
assertTrue(LocatorTestMarshaller.ok());
assertTrue(LocatorTestUnmarshaller.ok());
@@ -126,12 +127,92 @@
}
- public void testFQNConfig() throws Throwable
+ public void testDatatypePassConfigMapFalse() throws Throwable
{
log.info("entering " + getName());
+ // Cache marshaller/unmarshaller.
+ MarshalFactory.addMarshaller("config", new ConfigTestMarshaller(), new ConfigTestUnmarshaller());
+
// Start server.
HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.DATATYPE, "config");
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.DATATYPE, "config");
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(false, 2));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testDatatypePassConfigMapTrue() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Cache marshaller/unmarshaller.
+ MarshalFactory.addMarshaller("config", new ConfigTestMarshaller(), new ConfigTestUnmarshaller());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.DATATYPE, "config");
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.DATATYPE, "config");
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(true, 6));
+ assertTrue(ConfigTestUnmarshaller.ok(true, 4));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testFQNConfigDefault() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
serverConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
serverConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
setupServer("x=y", serverConfig);
@@ -152,8 +233,8 @@
log.info("connection is good");
// Do tests.
- assertTrue(ConfigTestMarshaller.ok(configTestMarshallerCount()));
- assertTrue(ConfigTestUnmarshaller.ok(configTestUnmarshallerCount()));
+ assertTrue(ConfigTestMarshaller.ok(false, 1));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
assertTrue(LocatorTestMarshaller.ok());
assertTrue(LocatorTestUnmarshaller.ok());
@@ -163,6 +244,86 @@
}
+
+
+ public void testFQNPassConfigMapFalse() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ serverConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ clientConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "false");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(false, 1));
+ assertTrue(ConfigTestUnmarshaller.ok(false, 0));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testFQNConfigPassConfigMapTrue() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ HashMap serverConfig = new HashMap();
+ serverConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ serverConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ serverConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ setupServer("x=y", serverConfig);
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(InvokerLocator.MARSHALLER, ConfigTestMarshaller.class.getName());
+ clientConfig.put(InvokerLocator.UNMARSHALLER, ConfigTestUnmarshaller.class.getName());
+ clientConfig.put(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ // Do tests.
+ assertTrue(ConfigTestMarshaller.ok(true, configTestMarshallerCount()));
+ assertTrue(ConfigTestUnmarshaller.ok(true, configTestUnmarshallerCount()));
+ assertTrue(LocatorTestMarshaller.ok());
+ assertTrue(LocatorTestUnmarshaller.ok());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
protected int configTestMarshallerCount()
{
return 3;
13 years, 10 months
JBoss Remoting SVN: r5240 - remoting2/branches/2.2/src/main/org/jboss/remoting/transport/web.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-15 17:52:16 -0400 (Fri, 15 May 2009)
New Revision: 5240
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java
Log:
JBREM-1102: Uses passConfigMapToMarshalFactory variable.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java 2009-05-15 21:51:55 UTC (rev 5239)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/web/WebServerInvoker.java 2009-05-15 21:52:16 UTC (rev 5240)
@@ -99,7 +99,8 @@
public UnMarshaller getUnMarshaller()
{
- UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader(), configuration);
+ Map map = passConfigMapToMarshalFactory ? configuration : null;
+ UnMarshaller unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader(), map);
if(unmarshaller == null)
{
unmarshaller = MarshalFactory.getUnMarshaller(getDataType(), getSerializationType());
@@ -109,7 +110,8 @@
public Marshaller getMarshaller()
{
- Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader(), configuration);
+ Map map = passConfigMapToMarshalFactory ? configuration : null;
+ Marshaller marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader(), map);
if(marshaller == null)
{
13 years, 10 months
JBoss Remoting SVN: r5239 - remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-15 17:51:55 -0400 (Fri, 15 May 2009)
New Revision: 5239
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java
Log:
JBREM-1102: Uses passConfigMapToMarshalFactory variable.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2009-05-15 21:51:16 UTC (rev 5238)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2009-05-15 21:51:55 UTC (rev 5239)
@@ -27,6 +27,7 @@
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvocationResponse;
import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.Remoting;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.Version;
import org.jboss.remoting.Client;
@@ -125,6 +126,8 @@
private long lastRequestHandledTimestamp = System.currentTimeMillis();
private boolean reuseAfterTimeout;
+
+ private boolean passConfigMapToMarshalFactory;
// Constructors ---------------------------------------------------------------------------------
@@ -159,6 +162,11 @@
{
shouldCheckConnection = true;
}
+ checkValue = (String)configMap.get(Remoting.PASS_CONFIG_MAP_TO_MARSHAL_FACTORY);
+ if (checkValue != null && checkValue.length() > 0)
+ {
+ passConfigMapToMarshalFactory = Boolean.valueOf(checkValue).booleanValue();
+ }
}
}
@@ -812,9 +820,10 @@
configMap = invoker.getConfiguration();
}
+ Map map = passConfigMapToMarshalFactory ? configMap : null;
if (unmarshaller == null)
{
- unmarshaller = MarshalFactory.getUnMarshaller(locator, classLoader, configMap);
+ unmarshaller = MarshalFactory.getUnMarshaller(locator, classLoader, map);
}
if (unmarshaller == null)
{
@@ -823,7 +832,7 @@
if (marshaller == null)
{
- marshaller = MarshalFactory.getMarshaller(locator, classLoader, configMap);
+ marshaller = MarshalFactory.getMarshaller(locator, classLoader, map);
}
if (marshaller == null)
{
13 years, 10 months
JBoss Remoting SVN: r5238 - remoting2/branches/2.2/src/main/org/jboss/remoting/transport/rmi.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-15 17:51:16 -0400 (Fri, 15 May 2009)
New Revision: 5238
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java
Log:
JBREM-1102: Uses passConfigMapToMarshalFactory variable.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java 2009-05-15 21:50:39 UTC (rev 5237)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/rmi/RMIServerInvoker.java 2009-05-15 21:51:16 UTC (rev 5238)
@@ -116,8 +116,9 @@
log.debug("Binding registry to " + "remoting/RMIServerInvoker/" + bindPort);
registry.rebind("remoting/RMIServerInvoker/" + bindPort, this);
- unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader(), configuration);
- marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader(), configuration);
+ Map map = passConfigMapToMarshalFactory ? configuration : null;
+ unmarshaller = MarshalFactory.getUnMarshaller(getLocator(), this.getClass().getClassLoader(), map);
+ marshaller = MarshalFactory.getMarshaller(getLocator(), this.getClass().getClassLoader(), map);
}
13 years, 10 months
JBoss Remoting SVN: r5237 - remoting2/branches/2.2/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-05-15 17:50:39 -0400 (Fri, 15 May 2009)
New Revision: 5237
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Remoting.java
Log:
JBREM-1102: Added "passConfigMapToMarshalFactory" key.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Remoting.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Remoting.java 2009-05-15 21:50:07 UTC (rev 5236)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Remoting.java 2009-05-15 21:50:39 UTC (rev 5237)
@@ -99,4 +99,11 @@
* fix a source of ClassCastExceptions.
*/
public static final String USE_CURRENT_THREAD_CLASS_LOADER = "useCurrentThreadClassLoader";
+
+ /**
+ * A flag for indicating that the Client configuration map should be used to configure
+ * marshallers and unmarshallers. If set to false (the default value), then parameters
+ * will be taken only from the InvokerLocator.
+ */
+ public static final String PASS_CONFIG_MAP_TO_MARSHAL_FACTORY = "passConfigMapToMarshalFactory";
}
13 years, 10 months