JBoss Remoting SVN: r4258 - remoting2/tags.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 21:31:30 -0400 (Wed, 28 May 2008)
New Revision: 4258
Added:
remoting2/tags/2.4.0-GA/
Log:
Copied: remoting2/tags/2.4.0-GA (from rev 4257, remoting2/branches/2.x)
16 years, 6 months
JBoss Remoting SVN: r4257 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 20:57:08 -0400 (Wed, 28 May 2008)
New Revision: 4257
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackErrorHandlerProxyTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackStoreProxyTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerInvokerHandlerProxyTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerSocketFactoryProxyTestCase.java
Log:
JBREM-977: Added reference to JBREM-977 in javadoc.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackErrorHandlerProxyTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackErrorHandlerProxyTestCase.java 2008-05-29 00:08:02 UTC (rev 4256)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackErrorHandlerProxyTestCase.java 2008-05-29 00:57:08 UTC (rev 4257)
@@ -50,6 +50,7 @@
/**
+ * Unit test for JBREM-977.
*
* @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
* @version $Revision: 1.1 $
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackStoreProxyTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackStoreProxyTestCase.java 2008-05-29 00:08:02 UTC (rev 4256)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/CallbackStoreProxyTestCase.java 2008-05-29 00:57:08 UTC (rev 4257)
@@ -50,7 +50,8 @@
/**
- *
+ * Unit test for JBREM-977.
+ *
* @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
* @version $Revision: 1.1 $
* <p>
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java 2008-05-29 00:08:02 UTC (rev 4256)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java 2008-05-29 00:57:08 UTC (rev 4257)
@@ -50,6 +50,8 @@
/**
+ * Unit test for JBREM-977.
+ *
* @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
* @version $Revision: 1.1 $
* <p>
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerInvokerHandlerProxyTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerInvokerHandlerProxyTestCase.java 2008-05-29 00:08:02 UTC (rev 4256)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerInvokerHandlerProxyTestCase.java 2008-05-29 00:57:08 UTC (rev 4257)
@@ -43,6 +43,7 @@
/**
+ * Unit test for JBREM-977.
*
* @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
* @version $Revision: 1.1 $
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerSocketFactoryProxyTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerSocketFactoryProxyTestCase.java 2008-05-29 00:08:02 UTC (rev 4256)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/ServerSocketFactoryProxyTestCase.java 2008-05-29 00:57:08 UTC (rev 4257)
@@ -49,6 +49,7 @@
/**
+ * Unit test for JBREM-977.
*
* @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
* @version $Revision: 1.1 $
16 years, 6 months
JBoss Remoting SVN: r4256 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 20:08:02 -0400 (Wed, 28 May 2008)
New Revision: 4256
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-840: Added MicroSocketClientInvoker.USE_ONEWAY_CONNECTION_TIMEOUT parameter.
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2008-05-28 23:25:45 UTC (rev 4255)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2008-05-29 00:08:02 UTC (rev 4256)
@@ -1619,15 +1619,15 @@
re-using it by sending a single byte ping from the client to the server
and then back from the server. This config needs to be set on both
client and server to work. This if false by default.</para>
-
- <para>An example of locator uri for a socket invoker that has
- TCP_NODELAY set to false and the client's max pool size of 30 would
- be:</para>
-
- <para><code>
- socket://test.somedomain.com:8084/?enableTcpNoDelay=false&maxPoolSize=30
- </code></para>
+ <para><emphasis role="bold">useOnewayConnectionTimeout</emphasis> -
+ indicates if, during a client side oneway invocation,
+ <classname>MicroSocketClientInvoker</classname> should wait for a
+ version byte from the server, which prevents the anomalous behavior
+ described in JBREM-706 "In socket transport, prevent client side oneway
+ invocations from artificially reducing concurrency". The default value
+ is "true".</para>
+
<para><emphasis role="bold">Note.</emphasis> As of Remoting version 2.4,
the following socket parameters, in addition to SO_TIMEOUT and
TCP_NODELAY, can be configured on the client client side: SO_KEEPALIVE,
@@ -6533,7 +6533,14 @@
'isParam' attribute). Making this change will not affect the
marshaller/unmarshaller that is used, which may also be a
requirement.</para>
-
+
+ <para><emphasis role="bold">USE_ONEWAY_CONNECTION_TIMEOUT</emphasis> (actual value "useOnewayConnectionTimeout") -
+ indicates if, during a client side oneway invocation,
+ <classname>MicroSocketClientInvoker</classname> should wait for a version
+ byte from the server, which prevents the anomalous behavior described in
+ JBREM-706 "In socket transport, prevent client side oneway invocations from
+ artificially reducing concurrency". The default value is "true".</para>
+
</section>
<section>
@@ -6563,6 +6570,7 @@
<para><emphasis role="bold">SERVER_SOCKET_CLASS_FLAG</emphasis> (actual
value is 'serverSocketClass') - specifies the fully qualified class name
for the custom SocketWrapper implementation to use on the server.</para>
+
</section>
</section>
16 years, 6 months
JBoss Remoting SVN: r4255 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 19:25:45 -0400 (Wed, 28 May 2008)
New Revision: 4255
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java
Log:
JBREM-986: Moved to org.jboss.test.remoting.transport.socket.connection.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java 2008-05-28 23:25:15 UTC (rev 4254)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java 2008-05-28 23:25:45 UTC (rev 4255)
@@ -1,228 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt 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.connection;
-
-import java.net.InetAddress;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.MBeanServer;
-
-import junit.framework.TestCase;
-
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
-import org.jboss.logging.XLevel;
-import org.jboss.remoting.Client;
-import org.jboss.remoting.InvocationRequest;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.ServerInvocationHandler;
-import org.jboss.remoting.ServerInvoker;
-import org.jboss.remoting.callback.InvokerCallbackHandler;
-import org.jboss.remoting.transport.Connector;
-import org.jboss.remoting.transport.PortUtil;
-import org.jboss.remoting.transport.socket.MicroSocketClientInvoker;
-
-/**
- * Unit test for JBREM-986.
- *
- * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
- * @version $Revision: 1.1 $
- * <p>
- * Copyright May 28, 2008
- * </p>
- */
-public class ConnectionWaitTestCase extends TestCase
-{
- private static Logger log = Logger.getLogger(ConnectionWaitTestCase.class);
-
- private static boolean firstTime = true;
-
- protected String host;
- protected int port;
- protected String locatorURI;
- protected InvokerLocator serverLocator;
- protected Connector connector;
- protected TestInvocationHandler invocationHandler;
-
-
- public void setUp() throws Exception
- {
- if (firstTime)
- {
- firstTime = false;
- Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
- Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
- String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
- PatternLayout layout = new PatternLayout(pattern);
- ConsoleAppender consoleAppender = new ConsoleAppender(layout);
- Logger.getRootLogger().addAppender(consoleAppender);
- }
- }
-
-
- public void tearDown()
- {
- }
-
-
- public void testConnectionWaitDefault() throws Throwable
- {
- log.info("entering " + getName());
-
- // Start server.
- setupServer();
-
- // Create client.
- InvokerLocator clientLocator = new InvokerLocator(locatorURI);
- HashMap clientConfig = new HashMap();
- clientConfig.put(InvokerLocator.FORCE_REMOTE, "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");
-
- // Verify connectionWait is set to default value.
- MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
- assertEquals(MicroSocketClientInvoker.CONNECTION_WAIT_DEFAULT, invoker.getConnectionWait());
-
- client.disconnect();
- shutdownServer();
- log.info(getName() + " PASSES");
- }
-
-
- public void testConnectionWaitSetInLocator() throws Throwable
- {
- log.info("entering " + getName());
-
- // Start server.
- setupServer();
-
- // Create client.
- String clientLocatorURI = locatorURI + "/?" + MicroSocketClientInvoker.CONNECTION_WAIT + "=12345";
- InvokerLocator clientLocator = new InvokerLocator(clientLocatorURI);
- HashMap clientConfig = new HashMap();
- clientConfig.put(InvokerLocator.FORCE_REMOTE, "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");
-
- // Verify connectionWait is set to configured value.
- MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
- assertEquals(12345, invoker.getConnectionWait());
-
- client.disconnect();
- shutdownServer();
- log.info(getName() + " PASSES");
- }
-
-
- public void testConnectionWaitSetInConfigMap() throws Throwable
- {
- log.info("entering " + getName());
-
- // Start server.
- setupServer();
-
- // Create client.
- InvokerLocator clientLocator = new InvokerLocator(locatorURI);
- HashMap clientConfig = new HashMap();
- clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
- clientConfig.put(MicroSocketClientInvoker.CONNECTION_WAIT, "12345");
- 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");
-
- // Verify connectionWait is set to configured value.
- MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
- assertEquals(12345, invoker.getConnectionWait());
-
- client.disconnect();
- shutdownServer();
- log.info(getName() + " PASSES");
- }
-
-
- protected String getTransport()
- {
- return "socket";
- }
-
-
- protected void addExtraClientConfig(Map config) {}
- protected void addExtraServerConfig(Map config) {}
-
-
- protected void setupServer() throws Exception
- {
- host = InetAddress.getLocalHost().getHostAddress();
- port = PortUtil.findFreePort(host);
- locatorURI = getTransport() + "://" + host + ":" + port;
- serverLocator = new InvokerLocator(locatorURI);
- log.info("Starting remoting server with locator uri of: " + locatorURI);
- HashMap config = new HashMap();
- config.put(InvokerLocator.FORCE_REMOTE, "true");
- addExtraServerConfig(config);
- connector = new Connector(serverLocator, config);
- connector.create();
- invocationHandler = new TestInvocationHandler();
- connector.addInvocationHandler("test", invocationHandler);
- connector.start();
- }
-
-
- protected void shutdownServer() throws Exception
- {
- if (connector != null)
- connector.stop();
- }
-
-
- static class TestInvocationHandler implements ServerInvocationHandler
- {
- public void addListener(InvokerCallbackHandler callbackHandler) {}
- public Object invoke(final InvocationRequest invocation) throws Throwable
- {
- return invocation.getParameter();
- }
- public void removeListener(InvokerCallbackHandler callbackHandler) {}
- public void setMBeanServer(MBeanServer server) {}
- public void setInvoker(ServerInvoker invoker) {}
- }
-}
\ No newline at end of file
16 years, 6 months
JBoss Remoting SVN: r4254 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/connection.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 19:25:15 -0400 (Wed, 28 May 2008)
New Revision: 4254
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/connection/ConnectionWaitTestCase.java
Log:
JBREM-986: Moved to org.jboss.test.remoting.transport.socket.connection.
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/connection/ConnectionWaitTestCase.java (from rev 4244, remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java)
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/connection/ConnectionWaitTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/connection/ConnectionWaitTestCase.java 2008-05-28 23:25:15 UTC (rev 4254)
@@ -0,0 +1,228 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.socket.connection;
+
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PatternLayout;
+import org.jboss.logging.XLevel;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+import org.jboss.remoting.transport.socket.MicroSocketClientInvoker;
+
+/**
+ * Unit test for JBREM-986.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright May 28, 2008
+ * </p>
+ */
+public class ConnectionWaitTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(ConnectionWaitTestCase.class);
+
+ private static boolean firstTime = true;
+
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+
+
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime = false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout = new PatternLayout(pattern);
+ ConsoleAppender consoleAppender = new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender);
+ }
+ }
+
+
+ public void tearDown()
+ {
+ }
+
+
+ public void testConnectionWaitDefault() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ setupServer();
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "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");
+
+ // Verify connectionWait is set to default value.
+ MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
+ assertEquals(MicroSocketClientInvoker.CONNECTION_WAIT_DEFAULT, invoker.getConnectionWait());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testConnectionWaitSetInLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ setupServer();
+
+ // Create client.
+ String clientLocatorURI = locatorURI + "/?" + MicroSocketClientInvoker.CONNECTION_WAIT + "=12345";
+ InvokerLocator clientLocator = new InvokerLocator(clientLocatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "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");
+
+ // Verify connectionWait is set to configured value.
+ MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
+ assertEquals(12345, invoker.getConnectionWait());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ public void testConnectionWaitSetInConfigMap() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ setupServer();
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(MicroSocketClientInvoker.CONNECTION_WAIT, "12345");
+ 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");
+
+ // Verify connectionWait is set to configured value.
+ MicroSocketClientInvoker invoker = (MicroSocketClientInvoker) client.getInvoker();
+ assertEquals(12345, invoker.getConnectionWait());
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ protected String getTransport()
+ {
+ return "socket";
+ }
+
+
+ protected void addExtraClientConfig(Map config) {}
+ protected void addExtraServerConfig(Map config) {}
+
+
+ protected void setupServer() throws Exception
+ {
+ host = InetAddress.getLocalHost().getHostAddress();
+ port = PortUtil.findFreePort(host);
+ locatorURI = getTransport() + "://" + host + ":" + port;
+ serverLocator = new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorURI);
+ HashMap config = new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector = new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler = new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ }
+
+
+ protected void shutdownServer() throws Exception
+ {
+ if (connector != null)
+ connector.stop();
+ }
+
+
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+}
\ No newline at end of file
16 years, 6 months
JBoss Remoting SVN: r4253 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 14:19:07 -0400 (Wed, 28 May 2008)
New Revision: 4253
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketRetryConfigTestCase.java
Log:
JBREM-986: Eliminated assert involving "numberOfRetries" parameter.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketRetryConfigTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketRetryConfigTestCase.java 2008-05-28 08:40:36 UTC (rev 4252)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketRetryConfigTestCase.java 2008-05-28 18:19:07 UTC (rev 4253)
@@ -32,14 +32,13 @@
*/
public class SocketRetryConfigTestCase extends TestCase
{
- private int socketRetries = 5;
private int callRetries = 6;
private int timeout = 1000;
public void testConfig() throws Throwable
{
InvokerLocator locator = new InvokerLocator("socket://localhost:8888" + "/?" + SocketClientInvoker.SO_TIMEOUT_FLAG + "=" + timeout + "&" +
- "NumberOfRetries=" + socketRetries + "&NumberOfCallRetries=" + callRetries);
+ "&NumberOfCallRetries=" + callRetries);
Connector connector = new Connector("socket://localhost:8888");
Client client = new Client(locator);
@@ -52,7 +51,6 @@
SocketClientInvoker invoker = (SocketClientInvoker)client.getInvoker();
- assertEquals(socketRetries, invoker.getNumberOfRetries());
assertEquals(callRetries, invoker.getNumberOfCallRetries());
assertEquals(timeout, invoker.getTimeout());
assertEquals(Boolean.FALSE.booleanValue(), invoker.checkingConnection());
16 years, 6 months
JBoss Remoting SVN: r4252 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 04:40:36 -0400 (Wed, 28 May 2008)
New Revision: 4252
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-840: Updated discussion of MicroSocketClientInvoker.transport().
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2008-05-28 07:37:45 UTC (rev 4251)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2008-05-28 08:40:36 UTC (rev 4252)
@@ -1490,23 +1490,30 @@
connection to the pool. As more client invocations are made, is possible
for the number of socket connections to reach the maximum allowed (which
is controlled by 'clientMaxPoolSize' property). At this point, when the
- next client invocation is made, it will wait up to 30 seconds, at which
- point it will throw an
- <classname>org.jboss.remoting.InvocationFailureException</classname>.</para>
+ next client invocation is made, it will wait up to some configured
+ number of milliseconds, at which point it will throw an
+ <classname>org.jboss.remoting.CannotConnectException</classname>. The
+ number of milliseconds is given by the parameter
+ <code>MicroSocketClientInvoker.CONNECTION_WAIT</code> (actual value
+ "connectionWait"), with a default of 30000 milliseconds. Note that if
+ more than one call retry is configured (see next paragraph), the
+ <classname>CannotConnectException</classname> will be swallowed.</para>
- <para>Once the socket client invoker goes get an available socket
- connection from the pool, are not out of the woods yet. There is still
- a possibility that the socket connection returned, while still
- appearing to be valid, has timed out while sitting in the pool. So if
- discover this while trying to make invocation, will throw it away and
- retry the whole process again. Will do this up to the number set by
- the numberOfCallRetries before throwing an exception. The trick here
- is that when get to numberOfCallRetries -2, will assume that any
- socket connection gotten from the pool will have timed out and will
- flush the pool all together so that the next retry will cause a new
- socket connection to be recreated. A typical scenario when this might
- occur is when have had a burst of client invocations and then a long
- period of inactivity.</para>
+ <para>Once the socket client invoker get an available socket connection
+ from the pool, are not out of the woods yet. For example, a network
+ problem could cause a <classname>java.net.SocketException</classname>.
+ There is also a possibility that the socket connection, while
+ still appearing to be valid, has "gone stale" while sitting in the pool.
+ For example, a <classname>ServerThread</classname> on the other side of
+ the connection could time out and close its socket. If the attempt to
+ complete an invocation fails, then
+ <classname>MicroSocketClientInvoker</classname> will make a number of
+ attempts, according to the parameter "numberOfCallRetries", with a
+ default value of 3. Once the configured number of retries has been
+ exhausted, an
+ <classname>org.jboss.remoting.InvocationFailureException</classname>
+ will be thrown.</para>
+
</section>
<section>
@@ -1592,18 +1599,13 @@
the socket client invoker. The default is 50.</para>
<para><emphasis role="bold">numberOfCallRetries</emphasis> - number of
- retries for making invocation. This is unrelated to numberOfRetries in
- that when this comes into play is after it has already received a client
- socket connection from the pool. However, is possible that the socket
- connection timed out while waiting within the pool. Since not doing a
- connection check by default, will throw away the connection and try to
- get a new one. Will do this for whatever the numberOfCallRetries (which
- defaults to 3) is. However, when reaches numberOfCallsRetries - 2, will
- flush the entire connection pool under the assumption that all
- connections in the pool have timed out and are invalid and will start
- over by creating a new connection. If still fails, will throw
- MarshalException with the cause being the original
- SocketException.</para>
+ retries for making invocation. It is possible that a socket connection
+ timed out while waiting within the pool. Since not doing a connection
+ check by default, will throw away the connection and try to get a new
+ one. Will do this for numberOfCallRetries times (which defaults to 3).
+ If still fails, will throw an
+ <classname>org.jboss.remoting.InvocationFailureException</classname>,
+ with the cause being the original exception.</para>
<para><emphasis role="bold">clientSocketClass</emphasis> - specifies the
fully qualified class name for the custom SocketWrapper implementation
16 years, 6 months
JBoss Remoting SVN: r4249 - remoting2/branches/2.x.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 03:26:31 -0400 (Wed, 28 May 2008)
New Revision: 4249
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-987: Updated version to 2.4.0.GA.
Modified: remoting2/branches/2.x/build.xml
===================================================================
--- remoting2/branches/2.x/build.xml 2008-05-28 07:25:48 UTC (rev 4248)
+++ remoting2/branches/2.x/build.xml 2008-05-28 07:26:31 UTC (rev 4249)
@@ -224,9 +224,9 @@
<!-- Module name(s) & version -->
<property name="module.name" value="remoting"/>
<property name="module.Name" value="JBoss Remoting"/>
- <property name="module.version" value="2.4.0.CR2"/>
+ <property name="module.version" value="2.4.0.GA"/>
<!-- extension is for the file suffix to use for dtribution build -->
- <property name="module.version.extension" value="2_4_0_CR2"/>
+ <property name="module.version.extension" value="2_4_0_GA"/>
<property name="implementation.url" value="http://www.jboss.org/products/remoting"/>
<property name="root.dir" value="${basedir}"/>
16 years, 6 months