JBoss Remoting SVN: r4248 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 03:25:48 -0400 (Wed, 28 May 2008)
New Revision: 4248
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java
Log:
JBREM-987: Updated version to 2.4.0.GA.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java 2008-05-28 07:11:02 UTC (rev 4247)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java 2008-05-28 07:25:48 UTC (rev 4248)
@@ -34,7 +34,7 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.4.0.CR2 (Pinto)";
+ public static final String VERSION = "2.4.0.GA (Pinto)";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
16 years, 7 months
JBoss Remoting SVN: r4247 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 03:11:02 -0400 (Wed, 28 May 2008)
New Revision: 4247
Modified:
remoting2/branches/2.x/docs/guide/en/chap17.xml
Log:
JBREM-840: Added some JIRA issues to chapter 17.
Modified: remoting2/branches/2.x/docs/guide/en/chap17.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap17.xml 2008-05-28 07:08:35 UTC (rev 4246)
+++ remoting2/branches/2.x/docs/guide/en/chap17.xml 2008-05-28 07:11:02 UTC (rev 4247)
@@ -68,7 +68,11 @@
<para>* [JBREM-971] - Enhance server-side connection error handling so certain (potentially revealing) socket-related exceptins are not discarded</para>
<para>* [JBREM-979] - Add invocation retry facility to http transport</para>
<para>* [JBREM-983] - Legacy XML configuration should support multihome feature</para>
+
+ <para><emphasis role="bold">Release</emphasis></para>
+ <para>* [JBREM-987] - Release 2.4.0.GA</para>
+
<para><emphasis role="bold">Task</emphasis></para>
<para>* [JBREM-238] - JBossRemoting testsuite needs to generate artificats in the output folder</para>
@@ -83,7 +87,9 @@
<para>* [JBREM-977] - Wrap MBean proxies in security conscious wrappers</para>
<para>* [JBREM-978] - Put code subject to a security manager in privileged blocks, part 2</para>
<para>* [JBREM-982] - Performance testing</para>
-
+ <para>* [JBREM-984] - Run soak test</para>
+ <para>* [JBREM-985] - Assure version compatibility with earlier versions of Remoting</para>
+ <para>* [JBREM-986] - Make configurable time MicroSocketClientInvoker should wait to get connection from pool</para>
<bridgehead>Release Notes - JBoss Remoting - Version 2.4.0.CR2 (Pinto)</bridgehead>
16 years, 7 months
JBoss Remoting SVN: r4246 - remoting2/branches/2.x/docs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 03:08:35 -0400 (Wed, 28 May 2008)
New Revision: 4246
Modified:
remoting2/branches/2.x/docs/README.txt
Log:
JBREM-987: Added some JIRA issues.
Modified: remoting2/branches/2.x/docs/README.txt
===================================================================
--- remoting2/branches/2.x/docs/README.txt 2008-05-28 06:55:25 UTC (rev 4245)
+++ remoting2/branches/2.x/docs/README.txt 2008-05-28 07:08:35 UTC (rev 4246)
@@ -30,9 +30,50 @@
in Jira, please create one.
==========================================================================================================
-Release Notes - JBoss Remoting - Version 2.4.0.CR2 - Text format
+Release Notes - JBoss Remoting - Version 2.4.0.GA
+
Bug
+ * [JBREM-936] - CLONE [JBREM-915] - NullPointerException in InvokerLocator
+ * [JBREM-938] - CLONE [JBREM-937] - Callback BisocketServerInvoker should reuse available ServerThreads
+ * [JBREM-952] - CLONE [JBREM-944] - Fix race in ConnectionNotifier
+ * [JBREM-980] - ServerInvokerServlet should retrieve ServletServerInvoker based on updated InvokerLocator
+
+Feature Request
+
+ * [JBREM-773] - Create bisocket sample code
+ * [JBREM-970] - Enhance client-side error reporting so a misspelled truststore file name required by SSL can be easily spotted
+ * [JBREM-971] - Enhance server-side connection error handling so certain (potentially revealing) socket-related exceptins are not discarded
+ * [JBREM-979] - Add invocation retry facility to http transport
+ * [JBREM-983] - Legacy XML configuration should support multihome feature
+
+Release
+
+ * [JBREM-987] - Release 2.4.0.GA
+
+Task
+
+ * [JBREM-238] - JBossRemoting testsuite needs to generate artificats in the output folder
+ * [JBREM-599] - remoting doc does not cover enabling or configuring leasing from the client side
+ * [JBREM-816] - Add instructions to Remoting Guide for overriding a transport or create a new transport
+ * [JBREM-840] - Update Remoting Guide for release 2.4.0
+ * [JBREM-920] - Create build.xml target to run test suite with a Security Manager
+ * [JBREM-930] - Fix chronic testsuite failures
+ * [JBREM-964] - Make InvocationFailureException extend java.rmi.MarshalException
+ * [JBREM-975] - Make sure all fixes on 2.2 branch are applied to 2.x branch
+ * [JBREM-976] - CLONE [JBREM-912] - Remove stacktrace when SSLSocketBuilder.createSSLSocketFactory() fails
+ * [JBREM-977] - Wrap MBean proxies in security conscious wrappers
+ * [JBREM-978] - Put code subject to a security manager in privileged blocks, part 2
+ * [JBREM-982] - Performance testing
+ * [JBREM-984] - Run soak test
+ * [JBREM-985] - Assure version compatibility with earlier versions of Remoting
+ * [JBREM-986] - Make configurable time MicroSocketClientInvoker should wait to get connection from pool
+
+
+==========================================================================================================
+Release Notes - JBoss Remoting - Version 2.4.0.CR2
+Bug
+
* [JBREM-947] - ConnectionValidator hangs when server dies
* [JBREM-951] - CLONE [JBREM-942] - A deadlock encountered on ConnectionValidator
* [JBREM-955] - CLONE [JBREM-954] - InterruptException should not be rethrown as CannotConnectionException
@@ -59,7 +100,6 @@
* [JBREM-810] - coyote.RequestMap not storing all request properties in the Map.Entry set
* [JBREM-826] - JBoss Remoting logs at ERROR and WARN in many places
* [JBREM-844] - Put instance variable "isRemotingUserAgent" on stack in CoyoteInvoker
- * [JBREM-898] - Fix encrypting marshaller/unmarshaller test cases
* [JBREM-901] - can't start NetworkRegistry if hostname is not resolvable
* [JBREM-924] - Compilation errors in non ISO-8859-1 systems
* [JBREM-927] - Adjust content length when CompressingUnMarshaller wraps HTTPUnMarshaller
@@ -175,8 +215,6 @@
Feature Request
* [JBREM-298] - Need ability to add transport specific info to invocation payload
- * [JBREM-480] - Insure reliable tests in socket invoker for unusable socket connections.
- * [JBREM-639] - Allow stream factory to be specified for all transports
* [JBREM-643] - configuration for multi-homed server invokers
* [JBREM-701] - add timeout config per client invocation for transports not descended from socket transport
* [JBREM-728] - Improve access to HTTP response headers
@@ -208,18 +246,13 @@
* [JBREM-63] - Get rid of the legacy configuration that embeds xml parsing
* [JBREM-228] - clustering
- * [JBREM-364] - refactor client invoker config for common configurations
- * [JBREM-475] - Eliminate ShutdownRequestThread in MultiplexingManager.
- * [JBREM-554] - Let virtual MultiplexServerInvokers share master MultiplexServerInvoker's thread pool.
* [JBREM-557] - need to include all the transports within the tests.versioning ant target
* [JBREM-641] - re-implement the callback polling for http transport to reduce latency
* [JBREM-687] - allow binding to 0.0.0.0
- * [JBREM-699] - Extend the Marshaller/UnMarshaller interfaces by incorporating the PreferredStreamMarshaller/PreferredStreamUnMarshaller interfaces
* [JBREM-706] - In socket transport, prevent client side oneway invocations from artificially reducing concurrency
* [JBREM-710] - Correct occasional failures of org.jboss.test.remoting.transport.socket.load.SocketLoadTestCase
* [JBREM-713] - Check if jbossweb can replace tomcat jars for the http server invoker
* [JBREM-715] - Don't log error for exception thrown by application in org.jboss.remoting.transport.socket.ServerThread.
- * [JBREM-729] - Make multiplex server invoker more robust
* [JBREM-730] - JNDIDetector should use rebind() instead of bind() to add new local detection messages
* [JBREM-733] - When org.jboss.remoting.Client.addListener() creates a Connector, it should pass in InvokerLocator parameters with configuration map.
* [JBREM-734] - BisocketClientInvoker constructor should get parameters from InvokerLocator as well as configuration map.
16 years, 7 months
JBoss Remoting SVN: r4245 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 02:55:25 -0400 (Wed, 28 May 2008)
New Revision: 4245
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/AbstractInvoker.java
Log:
JBREM-978: setClassLoader() uses AbstractInvoker.class classloader instead of classloader parameter.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/AbstractInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/AbstractInvoker.java 2008-05-28 06:48:14 UTC (rev 4244)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/AbstractInvoker.java 2008-05-28 06:55:25 UTC (rev 4245)
@@ -263,7 +263,7 @@
*
* @param classloader
*/
- public synchronized void setClassLoader(ClassLoader classloader)
+ public synchronized void setClassLoader(final ClassLoader classloader)
{
try
{
@@ -271,7 +271,7 @@
{
public Object run() throws Exception
{
- return new ClassByteClassLoader(AbstractInvoker.class.getClassLoader());
+ return new ClassByteClassLoader(classloader);
}
});
}
16 years, 7 months
JBoss Remoting SVN: r4244 - 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 02:48:14 -0400 (Wed, 28 May 2008)
New Revision: 4244
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorConfigTestClient.java
Log:
JBREM-986: Eliminated tests involving "numberOfRetries" parameter.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorConfigTestClient.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorConfigTestClient.java 2008-05-28 06:44:22 UTC (rev 4243)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorConfigTestClient.java 2008-05-28 06:48:14 UTC (rev 4244)
@@ -123,10 +123,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -178,10 +174,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -235,10 +227,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -292,10 +280,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -350,10 +334,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -407,10 +387,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -464,10 +440,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -521,10 +493,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -579,10 +547,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -635,10 +599,6 @@
assertTrue(invoker instanceof MicroSocketClientInvoker);
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
assertEquals(13, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -691,10 +651,6 @@
assertTrue(invoker instanceof MicroSocketClientInvoker);
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
assertEquals(7, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -748,10 +704,6 @@
assertTrue(invoker instanceof MicroSocketClientInvoker);
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
assertEquals(19, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -805,9 +757,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- assertEquals(21, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -861,9 +810,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- assertEquals(27, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -918,9 +864,6 @@
MicroSocketClientInvoker socketInvoker = (MicroSocketClientInvoker) invoker;
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
-
- // Test connection retries.
- assertEquals(33, socketInvoker.getNumberOfRetries());
client.disconnect();
}
@@ -974,10 +917,6 @@
int defaultPingRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_PING_RETRIES);
assertEquals(defaultPingRetries, socketInvoker.getNumberOfCallRetries());
- // Test connection retries.
- int defaultConnectionRetries = Integer.parseInt(ConnectionValidator.DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
- assertEquals(defaultConnectionRetries, socketInvoker.getNumberOfRetries());
-
// Test ReuseAddress.
assertFalse(socketInvoker.getReuseAddress());
16 years, 7 months
JBoss Remoting SVN: r4243 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 02:44:22 -0400 (Wed, 28 May 2008)
New Revision: 4243
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java
Log:
JBREM-986: Eliminated "numberOfRetries" parameter.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java 2008-05-28 06:43:08 UTC (rev 4242)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.java 2008-05-28 06:44:22 UTC (rev 4243)
@@ -62,12 +62,6 @@
* Currently implemented only on socket transport family.
*/
public static final String DEFAULT_NUMBER_OF_PING_RETRIES = "1";
-
- /**
- * Default number of connection acquisition retries. Value is 1.
- * Currently implemented only on socket transport family.
- */
- public static final String DEFAULT_NUMBER_OF_CONNECTION_RETRIES = "1";
/**
* Key to determine if ConnectionValidator should tie failure to presence
@@ -211,9 +205,6 @@
if (localConfig.get("NumberOfCallRetries") == null)
localConfig.put("NumberOfCallRetries", DEFAULT_NUMBER_OF_PING_RETRIES);
- if (localConfig.get("NumberOfRetries") == null)
- localConfig.put("NumberOfRetries", DEFAULT_NUMBER_OF_CONNECTION_RETRIES);
-
return localConfig;
}
16 years, 7 months
JBoss Remoting SVN: r4242 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-28 02:43:08 -0400 (Wed, 28 May 2008)
New Revision: 4242
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
Log:
JBREM-986: (1) Created "connectionWait" parameter; (2) eliminated "numberOfRetries" parameter.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-05-28 06:40:31 UTC (rev 4241)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-05-28 06:43:08 UTC (rev 4242)
@@ -83,19 +83,15 @@
*/
public static final String USE_ONEWAY_CONNECTION_TIMEOUT = "useOnewayConnectionTimeout";
+ /** Key for setting time to wait to get permission to get a connection */
+ public static final String CONNECTION_WAIT = "connectionWait";
+
/**
* Default value for enable TCP nodelay. Value is false.
*/
public static final boolean TCP_NODELAY_DEFAULT = false;
/**
- * Default maximum number of retries to get a valid socket from the* socket pool. This also
- * translates to number of seconds will wait for connection to be returned to connection pool
- * before erroring. Default is 30.
- */
- public static final int MAX_RETRIES = 30;
-
- /**
* Default maximum number of times a invocation will be made when it gets a SocketException.
* Default is 3.
*/
@@ -108,6 +104,9 @@
/** Default timeout value used by OnewayConnectionTask. Value is 2 seconds. */
public static final int ONEWAY_CONNECTION_TIMEOUT_DEFAULT = 2000;
+
+ /** Default time to wait to get permission to get a connection */
+ public static final int CONNECTION_WAIT_DEFAULT = 30000;
// Static ---------------------------------------------------------------------------------------
@@ -208,11 +207,11 @@
protected String clientSocketClassName;
protected Class clientSocketClass;
- protected int numberOfRetries;
protected int numberOfCallRetries;
protected int maxPoolSize;
protected int onewayConnectionTimeout;
protected boolean useOnewayConnectionTimeout = true;
+ protected int connectionWait = CONNECTION_WAIT_DEFAULT;
/**
* Pool for this invoker. This is shared between all instances of proxies attached to a specific
@@ -261,7 +260,6 @@
enableTcpNoDelay = TCP_NODELAY_DEFAULT;
clientSocketClassName = ClientSocketWrapper.class.getName();
clientSocketClass = null;
- numberOfRetries = MAX_RETRIES;
numberOfCallRetries = MAX_CALL_RETRIES;
pool = null;
maxPoolSize = MAX_POOL_SIZE;
@@ -407,6 +405,16 @@
}
}
+ public int getConnectionWait()
+ {
+ return connectionWait;
+ }
+
+ public void setConnectionWait(int connectionWait)
+ {
+ this.connectionWait = connectionWait;
+ }
+
public Home getHomeInUse()
{
return home;
@@ -439,19 +447,13 @@
*/
public void setNumberOfRetries(int numberOfRetries)
{
- if (numberOfRetries < 1)
- {
- this.numberOfRetries = MAX_RETRIES;
- }
- else
- {
- this.numberOfRetries = numberOfRetries;
- }
+ log.warn("numberOfRetries is no longer used");
}
public int getNumberOfRetries()
{
- return numberOfRetries;
+ log.warn("numberOfRetries is no longer used");
+ return -1;
}
/**
@@ -1037,7 +1039,7 @@
throws Exception
{
long start = System.currentTimeMillis();
- long timeToWait = (timeAllowed > 0) ? timeAllowed : 30000;
+ long timeToWait = (timeAllowed > 0) ? timeAllowed : connectionWait;
boolean timedout = !semaphore.attempt(timeToWait);
if (trace) log.trace(this + " obtained semaphore: " + semaphore.permits());
16 years, 7 months
JBoss Remoting SVN: r4241 - 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 02:40:31 -0400 (Wed, 28 May 2008)
New Revision: 4241
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java
Log:
JBREM-986: New unit test.
Added: 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 (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionWaitTestCase.java 2008-05-28 06:40:31 UTC (rev 4241)
@@ -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.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, 7 months
JBoss Remoting SVN: r4240 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-27 20:34:23 -0400 (Tue, 27 May 2008)
New Revision: 4240
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
Log:
JBREM-826: Removed stacktrace from log.warn() message.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2008-05-28 00:31:27 UTC (rev 4239)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2008-05-28 00:34:23 UTC (rev 4240)
@@ -342,7 +342,7 @@
catch (SocketException e)
{
if (getReuseAddress())
- log.warn("Unable to create unbound ServerSocket: cannot set reuseAddress to true",e);
+ log.warn("Unable to create unbound ServerSocket: cannot set reuseAddress to true");
try
{
16 years, 7 months
JBoss Remoting SVN: r4239 - remoting2/branches/2.x/src/main/org/jboss/remoting/util.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-27 20:31:27 -0400 (Tue, 27 May 2008)
New Revision: 4239
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java
Log:
JBREM-978: Commented out System.out.println().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java 2008-05-27 23:58:39 UTC (rev 4238)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/util/SecurityUtility.java 2008-05-28 00:31:27 UTC (rev 4239)
@@ -111,7 +111,7 @@
{
boolean b1 = System.getSecurityManager() == null;
boolean b2 = Boolean.getBoolean(Remoting.SKIP_ACCESS_CONTROL);
- System.out.println("security manager: " + System.getSecurityManager());
+// System.out.println("security manager: " + System.getSecurityManager());
return new Boolean(b1 || b2);
}
})).booleanValue();
@@ -128,6 +128,7 @@
return skipAccessControl;
}
+
///////////////////////////////////////////////////////////////////////////////////////
// FilePermission methods
///////////////////////////////////////////////////////////////////////////////////////
@@ -421,7 +422,7 @@
catch (PrivilegedActionException e)
{
throw (Exception) e.getCause();
- }
+ }
}
@@ -434,7 +435,7 @@
try
{
c = Class.forName("java.lang.management.ManagementFactory");
- }
+ }
catch (Exception e)
{
System.out.println("Unable to access java.lang.management.ManagementFactory: must be using jdk 1.4");
@@ -456,7 +457,7 @@
try
{
c = Class.forName("java.lang.management.ManagementFactory");
- }
+ }
catch (Exception e)
{
System.out.println("Unable to access java.lang.management.ManagementFactory: must be using jdk 1.4");
@@ -477,7 +478,7 @@
throw (IllegalAccessException) cause;
else
throw (InvocationTargetException) cause;
- }
+ }
}
@@ -880,6 +881,7 @@
}
}
+
///////////////////////////////////////////////////////////////////////////////////////
// SocketPermission methods
///////////////////////////////////////////////////////////////////////////////////////
16 years, 7 months