[jboss-remoting-commits] JBoss Remoting SVN: r5073 - remoting2/branches/2.x/docs/guide/en.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Mon Apr 20 22:41:41 EDT 2009
Author: ron.sigal at jboss.com
Date: 2009-04-20 22:41:41 -0400 (Mon, 20 Apr 2009)
New Revision: 5073
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-1124: Added discussion of "configOverridesLocator" parameter.
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-04-19 07:06:12 UTC (rev 5072)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-04-21 02:41:41 UTC (rev 5073)
@@ -90,7 +90,7 @@
locatorURI += params;
InvokerLocator locator = new InvokerLocator(locatorURI);
HashMap config = new HashMap();
-config.put(ServerInvoker.TIMEOUT, 120000);
+config.put(ServerInvoker.TIMEOUT, "120000");
config.put(ServerInvoker.SERVER_SOCKET_FACTORY, new MyServerSocketFactory());
Connector connector = new Connector(locator, config);
connector.create();
@@ -119,7 +119,7 @@
locatorURI += params;
InvokerLocator locator = new InvokerLocator(locatorURI);
HashMap config = new HashMap();
-config.put(ServerInvoker.TIMEOUT, 120000);
+config.put(ServerInvoker.TIMEOUT, "120000");
Connector connector = new Connector(locator, config);
connector.create();
ServerInvoker serverInvoker = connector.getServerInvoker();
@@ -144,7 +144,7 @@
above.</para>
<programlisting>HashMap config = new HashMap();
-config.put(ServerInvoker.TIMEOUT, 120000);
+config.put(ServerInvoker.TIMEOUT, "120000");
Connector connector = new Connector(config);
// Set xml configuration element.
@@ -189,7 +189,7 @@
examples above.</para>
<programlisting>HashMap config = new HashMap();
-config.put(ServerInvoker.TIMEOUT, 120000);
+config.put(ServerInvoker.TIMEOUT, "120000");
Connector connector = new Connector(config);
// Create ServerConfiguration object for socket transport
@@ -496,7 +496,7 @@
locatorURI += params;
InvokerLocator locator = new InvokerLocator(locatorURI);
HashMap config = new HashMap();
-config.put(ServerInvoker.TIMEOUT, 360000);
+config.put(ServerInvoker.TIMEOUT, "360000");
config.put(Remoting.CUSTOM_SOCKET_FACTORY, new MySocketFactory());
Client client = new Client(locator, config);
client.connect();</programlisting>
@@ -520,17 +520,51 @@
locatorURI += params;
InvokerLocator locator = new InvokerLocator(locatorURI);
HashMap config = new HashMap();
-config.put(ServerInvoker.TIMEOUT, 360000);
+config.put(ServerInvoker.TIMEOUT, "360000");
Client client = new Client(locator, config);
client.connect();
SocketFactory sf = new MySocketFactory();
ClientInvoker clientInvoker = client.getInvoker();
-clientInvoker.setSocketFactory(sf);</programlisting>
+clientInvoker.setSocketFactory(sf);
+ </programlisting>
<para><emphasis role="bold">Note.</emphasis> The
<classname>Client</classname> creates the client invoker during the call
to <methodname>Client.connect()</methodname>, so this option only works
after that method has been called.</para>
+
+ <para><emphasis role="bold">Note.</emphasis> Preference is given to values
+ in the <classname>InvokerLocator</classname>. For example, in</para>
+
+ <programlisting>String locatorURI = "socket://test.somedomain.com:8084/?clientMaxPoolSize=10";
+InvokerLocator locator = new InvokerLocator(locatorURI);
+HashMap config = new HashMap();
+config.put("clientMaxPoolSize", "20");
+Client client = new Client(locator, config);
+ </programlisting>
+
+ <para>the value of the variable <code>clientMaxPoolSize</code> would be set to 10.
+ As of release 2.5.2, that behavior can be reversed by setting the parameter
+ <code>org.jboss.remoting.Remoting.CONFIG_OVERRIDES_LOCATOR</code> (actual
+ value "configOverridesLocator") to true. As always, in determining the
+ value of the variable <code>configOverridesLocator</code>, preference is
+ given to the <classname>InvokerLocator</classname>. But if the value of
+ "configOverridesLocator" is set to true in the <classname>InvokerLocator</classname>,
+ or if "configOverridesLocator" is absent from the
+ <classname>InvokerLocator</classname> but it is set to "true" in
+ the configuration map, then preference will be given to values in
+ the configuration map. For example, in</para>
+
+ <programlisting>String locatorURI = "socket://test.somedomain.com:8084/?clientMaxPoolSize=10";
+InvokerLocator locator = new InvokerLocator(locatorURI);
+HashMap config = new HashMap();
+config.put("clientMaxPoolSize", "20");
+config.put("configOverridesLocator", "true");
+Client client = new Client(locator, config);
+ </programlisting>
+
+ <para>the value of the variable <code>clientMaxPoolSize</code> would be set to 20.</para>
+
</section>
</section>
@@ -5953,6 +5987,12 @@
<methodname>java.security.AccessController.doPrivileged()</methodname>
calls..</para>
+ <para><emphasis role="bold">CONFIG_OVERRIDES_LOCATOR</emphasis> (actual value is
+ "configOverridesLocator") - key for indicating that parameter values found
+ in the configuration map passed to an <classname>org.jboss.remoting.Client</classname>
+ constructor should take precedence over values found in the
+ <classname>InvokerLocator</classname>.</para>
+
</section>
<section>
More information about the jboss-remoting-commits
mailing list