JBoss Remoting SVN: r5481 - 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-09-15 20:02:52 -0400 (Tue, 15 Sep 2009)
New Revision: 5481
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java
Log:
JBREM-1120: Added log statement.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java 2009-09-15 23:58:59 UTC (rev 5480)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/ClientSocketWrapper.java 2009-09-16 00:02:52 UTC (rev 5481)
@@ -215,6 +215,7 @@
if (writeTimeout > 0)
{
os = new TimedOutputStream(os, writeTimeout);
+ if (trace) log.trace(this + " created TimedOutputStream: " + os);
}
if (marshaller instanceof PreferredStreamMarshaller)
15 years, 3 months
JBoss Remoting SVN: r5480 - remoting2/branches/2.2/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-15 19:58:59 -0400 (Tue, 15 Sep 2009)
New Revision: 5480
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1157: Set version to 2.2.3.SP1.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2009-09-15 18:20:16 UTC (rev 5479)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2009-09-15 23:58:59 UTC (rev 5480)
@@ -32,14 +32,14 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.2.3";
+ public static final String VERSION = "2.2.3.SP1";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
// static
// {
-// System.out.println("Remoting version: " + VERSION + ": 5/08/09-15:22");
+// System.out.println("Remoting version: " + VERSION + ": 9/14/2009 - 19:39");
// }
15 years, 3 months
JBoss Remoting SVN: r5479 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-15 14:20:16 -0400 (Tue, 15 Sep 2009)
New Revision: 5479
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java
Log:
JBREM-1152: Added Bisocket.IS_CALLBACK_SERVER to callback metadata map.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java 2009-09-15 02:41:33 UTC (rev 5478)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java 2009-09-15 18:20:16 UTC (rev 5479)
@@ -29,6 +29,7 @@
import java.net.SocketException;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
import java.util.Set;
import javax.net.ServerSocketFactory;
@@ -40,6 +41,7 @@
import org.jboss.remoting.callback.HandleCallbackException;
import org.jboss.remoting.callback.InvokerCallbackHandler;
import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.bisocket.Bisocket;
import org.jboss.remoting.transport.socket.LRUPool;
import org.jboss.remoting.transport.socket.ServerThread;
import org.jboss.remoting.transport.socket.SocketServerInvoker;
@@ -80,7 +82,9 @@
log.info("connection is good");
TestCallbackHandler callbackHandler = new TestCallbackHandler();
- client.addListener(callbackHandler, new HashMap());
+ Map metadata = new HashMap();
+ metadata.put(Bisocket.IS_CALLBACK_SERVER, "true");
+ client.addListener(callbackHandler, metadata);
// Get client side ServerThread pool.
Set callbackConnectors = client.getCallbackConnectors(callbackHandler);
15 years, 3 months
JBoss Remoting SVN: r5478 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/socketexception.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-14 22:41:33 -0400 (Mon, 14 Sep 2009)
New Revision: 5478
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/socketexception/SocketCreationExceptionTestCase.java
Log:
JBREM-1152: Changed characters before metadata to "/?" from "&".
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/socketexception/SocketCreationExceptionTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/socketexception/SocketCreationExceptionTestCase.java 2009-09-14 23:31:59 UTC (rev 5477)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/socketexception/SocketCreationExceptionTestCase.java 2009-09-15 02:41:33 UTC (rev 5478)
@@ -168,7 +168,7 @@
String metadata = System.getProperty("remoting.metadata");
if (metadata != null)
{
- locatorURI += "&" + metadata;
+ locatorURI += "/?" + metadata;
}
serverLocator = new InvokerLocator(locatorURI);
log.info("Starting remoting server with locator uri of: " + locatorURI);
15 years, 3 months
JBoss Remoting SVN: r5477 - 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-09-14 19:31:59 -0400 (Mon, 14 Sep 2009)
New Revision: 5477
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
Log:
JBREM-1146: Before checking generalized IOExceptions, check that exception message is not null.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2009-09-14 23:29:42 UTC (rev 5476)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2009-09-14 23:31:59 UTC (rev 5477)
@@ -585,6 +585,7 @@
for (; retryCount < numberOfCallRetries; retryCount++)
{
+ if (trace) log.trace(this + " retryCount: " + retryCount);
// timeLeft < 0 will indicate that there is no per invocation timeout.
int timeLeft = -1;
if (0 < tempTimeout)
@@ -619,7 +620,8 @@
semaphore.release();
if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
log.debug(this + " got " + e + ": " + e.getMessage());
- if (retryCount < numberOfCallRetries - 1 && isGeneralizeSocketException() && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
+ if (retryCount < numberOfCallRetries - 1 && isGeneralizeSocketException()
+ && e.getMessage() != null && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
{
continue;
}
@@ -712,7 +714,7 @@
}
catch (IOException e)
{
- if (isGeneralizeSocketException() && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
+ if (isGeneralizeSocketException() && e.getMessage() != null && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
{
handleSocketException(e, socketWrapper, semaphore, retryCount);
sockEx = new SocketException(e.getMessage());
15 years, 3 months
JBoss Remoting SVN: r5476 - 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: 2009-09-14 19:29:42 -0400 (Mon, 14 Sep 2009)
New Revision: 5476
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
Log:
JBREM-1146: Before checking generalized IOExceptions, check that exception message is not null.
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 2009-09-14 23:10:58 UTC (rev 5475)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2009-09-14 23:29:42 UTC (rev 5476)
@@ -930,7 +930,7 @@
}
catch (IOException e)
{
- if (isGeneralizeSocketException() && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
+ if (isGeneralizeSocketException() && e.getMessage() != null && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
{
handleRetriableException(socketWrapper, e, retryCount);
sockEx = new SocketException(e.getMessage());
15 years, 3 months
JBoss Remoting SVN: r5475 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-14 19:10:58 -0400 (Mon, 14 Sep 2009)
New Revision: 5475
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/CallbackClientWithZeroTimeoutTestCase.java
Log:
JBREM-845, JBREM-1152: Set "numberOfCallRetries" to "1" because getConnection() failures can now be retried.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/CallbackClientWithZeroTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/CallbackClientWithZeroTimeoutTestCase.java 2009-09-14 22:57:51 UTC (rev 5474)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/CallbackClientWithZeroTimeoutTestCase.java 2009-09-14 23:10:58 UTC (rev 5475)
@@ -206,6 +206,7 @@
log.info("Starting remoting server with locator uri of: " + locatorURI);
HashMap config = new HashMap();
config.put(InvokerLocator.FORCE_REMOTE, "true");
+ config.put("numberOfCallRetries", "1");
addExtraServerConfig(config);
connector = new Connector(serverLocator, config);
connector.create();
15 years, 3 months
JBoss Remoting SVN: r5474 - in remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3: spi and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-09-14 18:57:51 -0400 (Mon, 14 Sep 2009)
New Revision: 5474
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java
Log:
Minor fixups
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-09-14 19:53:20 UTC (rev 5473)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-09-14 22:57:51 UTC (rev 5474)
@@ -356,7 +356,7 @@
if (sm != null) {
sm.checkPermission(ADD_CONNECTION_PROVIDER_PERM);
}
- final ConnectionProviderContextImpl context = new ConnectionProviderContextImpl(executor, LOOPBACK_CONNECTION_HANDLER);
+ final ConnectionProviderContextImpl context = new ConnectionProviderContextImpl(executor, loopbackConnectionHandler);
final ConnectionProvider provider = providerFactory.createInstance(context);
if (connectionProviders.putIfAbsent(uriScheme, provider) != null) {
IoUtils.safeClose(context);
@@ -397,9 +397,9 @@
private class ConnectionImpl extends AbstractHandleableCloseable<Connection> implements Connection {
private final ConnectionHandler connectionHandler;
- private ConnectionImpl(final ConnectionHandlerFactory connectionHandler) {
+ private ConnectionImpl(final ConnectionHandlerFactory connectionHandlerFactory) {
super(EndpointImpl.this.executor);
- this.connectionHandler = connectionHandler.createInstance(LOOPBACK_CONNECTION_HANDLER);
+ connectionHandler = connectionHandlerFactory.createInstance(loopbackConnectionHandler);
}
public <I, O> IoFuture<? extends Client<I, O>> openClient(final String serviceType, final String groupName, final Class<I> requestClass, final Class<O> replyClass) {
@@ -460,7 +460,7 @@
}
}
- private final ConnectionHandler LOOPBACK_CONNECTION_HANDLER = new ConnectionHandler() {
+ private final ConnectionHandler loopbackConnectionHandler = new ConnectionHandler() {
public Cancellable open(final String serviceName, final String groupName, final Result<RequestHandler> result) {
// the loopback connection opens a local service
// local services are registered as RequestHandlerConnectors
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java 2009-09-14 19:53:20 UTC (rev 5473)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java 2009-09-14 22:57:51 UTC (rev 5474)
@@ -23,7 +23,10 @@
package org.jboss.remoting3.spi;
/**
+ * A factory which creates the connection handler for a connection. Instances of this interface are used only
+ * one time to create the single handler instance to correspond to the given local handler.
*
+ * @remoting.implement
*/
public interface ConnectionHandlerFactory {
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java 2009-09-14 19:53:20 UTC (rev 5473)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java 2009-09-14 22:57:51 UTC (rev 5474)
@@ -25,7 +25,8 @@
import java.net.URI;
/**
- * A connection provider. Used to establish connections with remote systems.
+ * A connection provider. Used to establish connections with remote systems. There is typically one instance
+ * of this interface per connection provider factory per endpoint.
*
* @remoting.implement
*/
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java 2009-09-14 19:53:20 UTC (rev 5473)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java 2009-09-14 22:57:51 UTC (rev 5474)
@@ -23,7 +23,9 @@
package org.jboss.remoting3.spi;
/**
- * A connection provider factory. Implementations of this interface provide a connection facility for a URI scheme.
+ * A connection provider factory. Implementations of this interface provide a connection facility for a URI scheme. An
+ * endpoint will call the {@code createInstance()} method with its provider context when instances of this interface
+ * are registered on that endpoint.
*/
public interface ConnectionProviderFactory {
15 years, 3 months
JBoss Remoting SVN: r5473 - remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-14 15:53:20 -0400 (Mon, 14 Sep 2009)
New Revision: 5473
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
Log:
JBREM-1147, JBREM-1152: If createSocket() fails to write Bisocket.CREATE_ORDINARY_SOCKET, it should timeout before returning, which gives the control connection a chance to be recreated.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java 2009-09-14 18:54:46 UTC (rev 5472)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java 2009-09-14 19:53:20 UTC (rev 5473)
@@ -484,6 +484,8 @@
}
}
+ IOException savedException = null;
+
synchronized (controlLock)
{
if (log.isTraceEnabled()) log.trace(this + " writing Bisocket.CREATE_ORDINARY_SOCKET on " + controlOutputStream);
@@ -507,7 +509,7 @@
catch (IOException e)
{
log.debug(this + " unable to write Bisocket.CREATE_ORDINARY_SOCKET", e);
- throw e;
+ savedException = e;
}
}
@@ -571,6 +573,11 @@
throw new SocketException("Unable to create socket");
}
+ if (savedException != null)
+ {
+ throw savedException;
+ }
+
throw new SocketException("Timed out trying to create socket");
}
15 years, 3 months
JBoss Remoting SVN: r5472 - 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-09-14 14:54:46 -0400 (Mon, 14 Sep 2009)
New Revision: 5472
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
Log:
JBREM-1152: Assures that last getConnection() failure with SocketException throws CannotConnectException.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2009-09-14 16:19:38 UTC (rev 5471)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2009-09-14 18:54:46 UTC (rev 5472)
@@ -602,17 +602,25 @@
}
catch (SocketException e)
{
+ semaphore.release();
+ if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
log.debug(this + " got " + e + ": " + e.getMessage());
- semaphore.release();
- continue;
+ if (retryCount < numberOfCallRetries - 1)
+ {
+ continue;
+ }
+ throw new CannotConnectException(
+ "Can not get connection to server. Problem establishing " +
+ "socket connection for " + locator, e);
+
}
catch (IOException e)
- {
+ {
semaphore.release();
if (trace) log.trace(this + " released semaphore: " + semaphore.permits());
- if (isGeneralizeSocketException() && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
+ log.debug(this + " got " + e + ": " + e.getMessage());
+ if (retryCount < numberOfCallRetries - 1 && isGeneralizeSocketException() && RETRIABLE_ERROR_MESSAGE.matcher(e.getMessage()).matches())
{
- log.debug(this + " got " + e + ": " + e.getMessage());
continue;
}
throw new CannotConnectException(
15 years, 3 months