From jboss-remoting-commits at lists.jboss.org Fri Apr 3 01:36:06 2009
Content-Type: multipart/mixed; boundary="===============2564908850745814532=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4911 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection.
Date: Fri, 03 Apr 2009 01:36:06 -0400
Message-ID:
--===============2564908850745814532==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 01:36:05 -0400 (Fri, 03 Apr 2009)
New Revision: 4911
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/Conn=
ectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: New unit tests.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/=
ConnectionValidatorDisconnectTimeoutTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java (rev=
0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-03 05:36:05 UTC (rev=
4911)
@@ -0,0 +1,592 @@
+/*
+ * 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.connection;
+
+import java.io.IOException;
+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.ClientDisconnectedException;
+import org.jboss.remoting.ConnectionListener;
+import org.jboss.remoting.ConnectionValidator;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.InvokerRegistry;
+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.ServerFactory;
+import org.jboss.remoting.transport.socket.SocketServerInvoker;
+
+
+/**
+ * Unit test for JBREM-1112.
+ * =
+ * @author Ron Sigal
+ * @version =
+ *
+ * Copyright Apr 3, 2009
+ *
+ */
+public class ConnectionValidatorDisconnectTimeoutTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(ConnectionValidatorDisco=
nnectTimeoutTestCase.class);
+ =
+ private static boolean firstTime =3D true;
+ =
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+ protected TestConnectionListener serverConnectionListener;
+
+ =
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testDefaultUnary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testDefaultFirstBinary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, 500);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testDefaultSecondBinary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroInvokerLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ String clientLocatorURI =3D locatorURI;
+ clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D0";
+ InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroInvokerLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ String clientLocatorURI =3D locatorURI;
+ clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D10000";
+ InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroConfig() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ clientConfig.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "0"=
);
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroConfig() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ clientConfig.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "10=
000");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroMetadata() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ HashMap metadata =3D new HashMap();
+ metadata.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "0");
+ client.addConnectionListener(clientConnectionListener, metadata);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroMetadata() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ HashMap metadata =3D new HashMap();
+ metadata.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "10000"=
);
+ client.addConnectionListener(clientConnectionListener, metadata);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ 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
+ {
+ InvokerRegistry.registerInvokerFactories("socket", org.jboss.remotin=
g.transport.socket.TransportClientFactory.class, TestServerInvokerFactory.c=
lass);
+ host =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ String metadata =3D System.getProperty("remoting.metadata");
+ if (metadata !=3D null)
+ {
+ locatorURI +=3D "/?" + metadata;
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ config.put("leasePeriod", "1000");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ serverConnectionListener =3D new TestConnectionListener("SERVER");
+ connector.addConnectionListener(serverConnectionListener);
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ static class TestServerInvoker extends SocketServerInvoker
+ {
+ public TestServerInvoker(InvokerLocator locator, Map configuration)
+ {
+ super(locator, configuration); =
+ }
+
+ public Object invoke(InvocationRequest invocation) throws Throwable
+ {
+ Object param =3D invocation.getParameter();
+
+ // check to see if this is a is alive ping
+ if ("$PING$".equals(param))
+ {
+ Map metadata =3D invocation.getRequestPayload();
+ if (metadata !=3D null)
+ {
+ String invokerSessionId =3D (String) metadata.get(INVOKER_S=
ESSION_ID);
+ if (invokerSessionId !=3D null)
+ {
+ // Comes from ConnectionValidator configured to tie vali=
dation with lease.
+ log.info(this + " responding FALSE to $PING$ for invoker=
sessionId " + invokerSessionId);
+ return Boolean.FALSE;
+ }
+ }
+ }
+
+ return super.invoke(invocation);
+ }
+ }
+ =
+ =
+ public static class TestServerInvokerFactory implements ServerFactory
+ {
+ public ServerInvoker createServerInvoker(InvokerLocator locator, Map=
config) throws IOException
+ {
+ return new TestServerInvoker(locator, config);
+ }
+
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+
+ =
+ static class TestConnectionListener implements ConnectionListener
+ {
+ public boolean notified;
+ public Throwable throwable;
+ String name;
+ =
+ TestConnectionListener(String name)
+ {
+ this.name =3D name;
+ }
+ =
+ public void handleConnectionException(Throwable throwable, Client cl=
ient)
+ {
+ notified =3D true;
+ this.throwable =3D throwable;
+ log.info(this + " NOTIFIED, throwable =3D " + throwable);
+ }
+ =
+ public String toString()
+ {
+ return "TestConnectionListener[" + name + "]";
+ }
+ }
+}
\ No newline at end of file
--===============2564908850745814532==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 01:40:18 2009
Content-Type: multipart/mixed; boundary="===============2389417662793041100=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4912 -
remoting2/branches/2.2/src/main/org/jboss/remoting.
Date: Fri, 03 Apr 2009 01:40:18 -0400
Message-ID:
--===============2389417662793041100==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 01:40:18 -0400 (Fri, 03 Apr 2009)
New Revision: 4912
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.j=
ava
Log:
JBREM-1112: Introduced failureDisconnectTimeout variable.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionVali=
dator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-03 05:36:05 UTC (rev 4911)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-03 05:40:18 UTC (rev 4912)
@@ -72,12 +72,18 @@
* of active lease on server side. Default value is "true".
*/
public static final String TIE_TO_LEASE =3D "tieToLease";
+ =
/**
* Key to determine whether to stop ConnectionValidator when PING fails.
* Default value is "true".
*/
public static final String STOP_LEASE_ON_FAILURE =3D "stopLeaseOnFailur=
e";
=
+ /**
+ * Key to determine value of disconnectTimeout upon connection failure.
+ */
+ public static final String FAILURE_DISCONNECT_TIMEOUT =3D "failureDisco=
nnectTimeout";
+ =
// Static -------------------------------------------------------------=
--------------------------
=
private static boolean trace =3D log.isTraceEnabled();
@@ -237,6 +243,7 @@
private boolean tieToLease =3D true;
private boolean stopLeaseOnFailure =3D true;
private int pingTimeout;
+ private int failureDisconnectTimeout =3D -1;
private boolean isValid;
private Timer timer;
=
@@ -409,7 +416,7 @@
=
public String toString()
{
- return "ConnectionValidator[" + clientInvoker + ", pingPeriod=3D" + =
pingPeriod + " ms]";
+ return "ConnectionValidator[" + Integer.toHexString(System.identityH=
ashCode(this)) + ":" + clientInvoker + ", pingPeriod=3D" + pingPeriod + " m=
s]";
}
=
// Package protected --------------------------------------------------=
--------------------------
@@ -577,6 +584,28 @@
" to a boolean: must be a String");
}
}
+ =
+ o =3D config.get(FAILURE_DISCONNECT_TIMEOUT);
+ if (o !=3D null)
+ {
+ if (o instanceof String)
+ {
+ try
+ {
+ failureDisconnectTimeout =3D Integer.valueOf(((String) o=
)).intValue();
+ }
+ catch (Exception e)
+ {
+ log.warn(this + " could not convert " + FAILURE_DISCONNE=
CT_TIMEOUT + " value" +
+ " to an int: " + o);
+ }
+ }
+ else
+ {
+ log.warn(this + " could not convert " + FAILURE_DISCONNECT_=
TIMEOUT + " value" +
+ " to an int: must be a String");
+ }
+ }
}
}
=
@@ -717,6 +746,7 @@
{
public void run()
{
+ log.debug(this + " calling " + listener + ".handleConnec=
tionException()");
listener.handleConnectionException(t, client);
}
}.start();
@@ -758,7 +788,7 @@
=
if (!isValid)
{
- log.debug(ConnectionValidator.this + "'s connections is invali=
d");
+ log.debug(ConnectionValidator.this + "'s connection is invalid=
");
=
notifyListeners(new Exception("Could not connect to server!"));
=
@@ -769,7 +799,8 @@
=
if (invoker !=3D null)
{
- invoker.terminateLease(null, client.getDisconnectTimeout=
());
+ int disconnectTimeout =3D (failureDisconnectTimeout =3D=
=3D -1) ? client.getDisconnectTimeout() : failureDisconnectTimeout;
+ invoker.terminateLease(null, disconnectTimeout);
log.debug(ConnectionValidator.this + " shut down lease p=
inger");
}
else
--===============2389417662793041100==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 01:42:41 2009
Content-Type: multipart/mixed; boundary="===============4935962208984281940=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4913 -
remoting2/branches/2.2/src/main/org/jboss/remoting.
Date: Fri, 03 Apr 2009 01:42:41 -0400
Message-ID:
--===============4935962208984281940==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 01:42:41 -0400 (Fri, 03 Apr 2009)
New Revision: 4913
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.java
Log:
JBREM-1112: Added log.debug() call with disconnectTimeout.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.ja=
va
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-03 05:40:18 UTC (rev 4912)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-03 05:42:41 UTC (rev 4913)
@@ -81,6 +81,7 @@
HashMap metadata =3D null;
=
// If disconnectTimeout =3D=3D 0, skip network i/o.
+ log.debug(this + ": disconnectTimeout: " + disconnectTimeout);
if (disconnectTimeout !=3D 0)
{
if (disconnectTimeout > 0)
--===============4935962208984281940==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 01:44:52 2009
Content-Type: multipart/mixed; boundary="===============6273601732247252396=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4914 -
remoting2/branches/2.2/src/main/org/jboss/remoting.
Date: Fri, 03 Apr 2009 01:44:52 -0400
Message-ID:
--===============6273601732247252396==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 01:44:52 -0400 (Fri, 03 Apr 2009)
New Revision: 4914
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java
Log:
JBREM-1112: Added log.debug() when requestPayload is null..
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java 2009-04-0=
3 05:42:41 UTC (rev 4913)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java 2009-04-0=
3 05:44:52 UTC (rev 4914)
@@ -219,6 +219,7 @@
}
else
{
+ log.debug("requestPayload =3D=3D null, calling ConnectionNotifier=
.connectionTerminated()");
notifier.connectionTerminated(locatorURL, clientSessionId, null);
}
}
--===============6273601732247252396==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 02:43:57 2009
Content-Type: multipart/mixed; boundary="===============4029023802921128814=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4916 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection.
Date: Fri, 03 Apr 2009 02:43:56 -0400
Message-ID:
--===============4029023802921128814==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 02:43:56 -0400 (Fri, 03 Apr 2009)
New Revision: 4916
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Conn=
ectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: New unit tests.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/=
ConnectionValidatorDisconnectTimeoutTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java (rev=
0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-03 06:43:56 UTC (rev=
4916)
@@ -0,0 +1,592 @@
+/*
+ * 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.connection;
+
+import java.io.IOException;
+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.ClientDisconnectedException;
+import org.jboss.remoting.ConnectionListener;
+import org.jboss.remoting.ConnectionValidator;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.InvokerRegistry;
+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.ServerFactory;
+import org.jboss.remoting.transport.socket.SocketServerInvoker;
+
+
+/**
+ * Unit test for JBREM-1112.
+ * =
+ * @author Ron Sigal
+ * @version =
+ *
+ * Copyright Apr 3, 2009
+ *
+ */
+public class ConnectionValidatorDisconnectTimeoutTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(ConnectionValidatorDisco=
nnectTimeoutTestCase.class);
+ =
+ private static boolean firstTime =3D true;
+ =
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+ protected TestConnectionListener serverConnectionListener;
+
+ =
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testDefaultUnary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testDefaultFirstBinary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, 500);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testDefaultSecondBinary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroInvokerLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ String clientLocatorURI =3D locatorURI;
+ clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D0";
+ InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroInvokerLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ String clientLocatorURI =3D locatorURI;
+ clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D10000";
+ InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroConfig() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ clientConfig.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "0"=
);
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroConfig() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ clientConfig.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "10=
000");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroMetadata() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ HashMap metadata =3D new HashMap();
+ metadata.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "0");
+ client.addConnectionListener(clientConnectionListener, metadata);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroMetadata() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ HashMap metadata =3D new HashMap();
+ metadata.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "10000"=
);
+ client.addConnectionListener(clientConnectionListener, metadata);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ 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
+ {
+ InvokerRegistry.registerInvokerFactories("socket", org.jboss.remotin=
g.transport.socket.TransportClientFactory.class, TestServerInvokerFactory.c=
lass);
+ host =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ String metadata =3D System.getProperty("remoting.metadata");
+ if (metadata !=3D null)
+ {
+ locatorURI +=3D "/?" + metadata;
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ config.put("leasePeriod", "1000");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ serverConnectionListener =3D new TestConnectionListener("SERVER");
+ connector.addConnectionListener(serverConnectionListener);
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ static class TestServerInvoker extends SocketServerInvoker
+ {
+ public TestServerInvoker(InvokerLocator locator, Map configuration)
+ {
+ super(locator, configuration); =
+ }
+
+ public Object invoke(InvocationRequest invocation) throws Throwable
+ {
+ Object param =3D invocation.getParameter();
+
+ // check to see if this is a is alive ping
+ if ("$PING$".equals(param))
+ {
+ Map metadata =3D invocation.getRequestPayload();
+ if (metadata !=3D null)
+ {
+ String invokerSessionId =3D (String) metadata.get(INVOKER_S=
ESSION_ID);
+ if (invokerSessionId !=3D null)
+ {
+ // Comes from ConnectionValidator configured to tie vali=
dation with lease.
+ log.info(this + " responding FALSE to $PING$ for invoker=
sessionId " + invokerSessionId);
+ return Boolean.FALSE;
+ }
+ }
+ }
+
+ return super.invoke(invocation);
+ }
+ }
+ =
+ =
+ public static class TestServerInvokerFactory implements ServerFactory
+ {
+ public ServerInvoker createServerInvoker(InvokerLocator locator, Map=
config) throws IOException
+ {
+ return new TestServerInvoker(locator, config);
+ }
+
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+
+ =
+ static class TestConnectionListener implements ConnectionListener
+ {
+ public boolean notified;
+ public Throwable throwable;
+ String name;
+ =
+ TestConnectionListener(String name)
+ {
+ this.name =3D name;
+ }
+ =
+ public void handleConnectionException(Throwable throwable, Client cl=
ient)
+ {
+ notified =3D true;
+ this.throwable =3D throwable;
+ log.info(this + " NOTIFIED, throwable =3D " + throwable);
+ }
+ =
+ public String toString()
+ {
+ return "TestConnectionListener[" + name + "]";
+ }
+ }
+}
\ No newline at end of file
--===============4029023802921128814==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 02:44:47 2009
Content-Type: multipart/mixed; boundary="===============2200418899455219525=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4917 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Fri, 03 Apr 2009 02:44:46 -0400
Message-ID:
--===============2200418899455219525==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 02:44:46 -0400 (Fri, 03 Apr 2009)
New Revision: 4917
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.j=
ava
Log:
JBREM-1112: Introduced failureDisconnectTimeout variable.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionVali=
dator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-03 06:43:56 UTC (rev 4916)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-03 06:44:46 UTC (rev 4917)
@@ -72,12 +72,18 @@
* of active lease on server side. Default value is "true".
*/
public static final String TIE_TO_LEASE =3D "tieToLease";
+ =
/**
* Key to determine whether to stop ConnectionValidator when PING fails.
* Default value is "true".
*/
public static final String STOP_LEASE_ON_FAILURE =3D "stopLeaseOnFailur=
e";
=
+ /**
+ * Key to determine value of disconnectTimeout upon connection failure.
+ */
+ public static final String FAILURE_DISCONNECT_TIMEOUT =3D "failureDisco=
nnectTimeout";
+ =
// Static -------------------------------------------------------------=
--------------------------
=
private static boolean trace =3D log.isTraceEnabled();
@@ -236,6 +242,7 @@
private boolean tieToLease =3D true;
private boolean stopLeaseOnFailure =3D true;
private int pingTimeout;
+ private int failureDisconnectTimeout =3D -1;
private boolean isValid;
private Timer timer;
=
@@ -408,7 +415,7 @@
=
public String toString()
{
- return "ConnectionValidator[" + clientInvoker + ", pingPeriod=3D" + =
pingPeriod + " ms]";
+ return "ConnectionValidator[" + Integer.toHexString(System.identityH=
ashCode(this)) + ":" + clientInvoker + ", pingPeriod=3D" + pingPeriod + " m=
s]";
}
=
// Package protected --------------------------------------------------=
--------------------------
@@ -576,6 +583,28 @@
" to a boolean: must be a String");
}
}
+ =
+ o =3D config.get(FAILURE_DISCONNECT_TIMEOUT);
+ if (o !=3D null)
+ {
+ if (o instanceof String)
+ {
+ try
+ {
+ failureDisconnectTimeout =3D Integer.valueOf(((String) o=
)).intValue();
+ }
+ catch (Exception e)
+ {
+ log.warn(this + " could not convert " + FAILURE_DISCONNE=
CT_TIMEOUT + " value" +
+ " to an int: " + o);
+ }
+ }
+ else
+ {
+ log.warn(this + " could not convert " + FAILURE_DISCONNECT_=
TIMEOUT + " value" +
+ " to an int: must be a String");
+ }
+ }
}
}
=
@@ -716,6 +745,7 @@
{
public void run()
{
+ log.debug(this + " calling " + listener + ".handleConnec=
tionException()");
listener.handleConnectionException(t, client);
}
}.start();
@@ -757,7 +787,7 @@
=
if (!isValid)
{
- log.debug(ConnectionValidator.this + "'s connections is invali=
d");
+ log.debug(ConnectionValidator.this + "'s connection is invalid=
");
=
notifyListeners(new Exception("Could not connect to server!"));
=
@@ -768,7 +798,8 @@
=
if (invoker !=3D null)
{
- invoker.terminateLease(null, client.getDisconnectTimeout=
());
+ int disconnectTimeout =3D (failureDisconnectTimeout =3D=
=3D -1) ? client.getDisconnectTimeout() : failureDisconnectTimeout;
+ invoker.terminateLease(null, disconnectTimeout);
log.debug(ConnectionValidator.this + " shut down lease p=
inger");
}
else
--===============2200418899455219525==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 02:48:12 2009
Content-Type: multipart/mixed; boundary="===============4109775085165167896=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4918 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Fri, 03 Apr 2009 02:48:12 -0400
Message-ID:
--===============4109775085165167896==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 02:48:12 -0400 (Fri, 03 Apr 2009)
New Revision: 4918
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.java
Log:
JBREM-1112: Added log.debug() call with disconnectTimeout.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.ja=
va
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-03 06:44:46 UTC (rev 4917)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-03 06:48:12 UTC (rev 4918)
@@ -115,6 +115,7 @@
HashMap metadata =3D null;
=
// If disconnectTimeout =3D=3D 0, skip network i/o.
+ log.debug(this + ": disconnectTimeout: " + disconnectTimeout);
if (disconnectTimeout !=3D 0)
{
if (disconnectTimeout > 0)
--===============4109775085165167896==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 02:49:35 2009
Content-Type: multipart/mixed; boundary="===============8862162229790745816=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4919 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Fri, 03 Apr 2009 02:49:35 -0400
Message-ID:
--===============8862162229790745816==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-03 02:49:35 -0400 (Fri, 03 Apr 2009)
New Revision: 4919
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Lease.java
Log:
JBREM-1112: Added log.debug() when requestPayload is null.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Lease.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Lease.java 2009-04-0=
3 06:48:12 UTC (rev 4918)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Lease.java 2009-04-0=
3 06:49:35 UTC (rev 4919)
@@ -219,6 +219,7 @@
}
else
{
+ log.debug("requestPayload =3D=3D null, calling ConnectionNotifier=
.connectionTerminated()");
notifier.connectionTerminated(locatorURL, clientSessionId, null);
}
}
--===============8862162229790745816==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 19:21:49 2009
Content-Type: multipart/mixed; boundary="===============1918862263912813023=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4920 -
remoting2/branches.
Date: Fri, 03 Apr 2009 19:21:48 -0400
Message-ID:
--===============1918862263912813023==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jbertram(a)redhat.com
Date: 2009-04-03 19:21:48 -0400 (Fri, 03 Apr 2009)
New Revision: 4920
Added:
remoting2/branches/2.2.2-SP11_JBREM-1112/
Log:
[JBPAPP-1861] create patch branch
Copied: remoting2/branches/2.2.2-SP11_JBREM-1112 (from rev 4919, remoting2/=
tags/2.2.2-SP11)
--===============1918862263912813023==--
From jboss-remoting-commits at lists.jboss.org Fri Apr 3 19:31:44 2009
Content-Type: multipart/mixed; boundary="===============0117744571263987094=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4921 - in
remoting2/branches/2.2.2-SP11_JBREM-1112/src:
tests/org/jboss/test/remoting/connection and 1 other directory.
Date: Fri, 03 Apr 2009 19:31:44 -0400
Message-ID:
--===============0117744571263987094==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: jbertram(a)redhat.com
Date: 2009-04-03 19:31:44 -0400 (Fri, 03 Apr 2009)
New Revision: 4921
Added:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remoti=
ng/connection/ConnectionValidatorDisconnectTimeoutTestCase.java
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Con=
nectionValidator.java
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Lea=
se.java
remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Lea=
sePinger.java
Log:
[JBPAPP-1861]
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remot=
ing/ConnectionValidator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Co=
nnectionValidator.java 2009-04-03 23:21:48 UTC (rev 4920)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Co=
nnectionValidator.java 2009-04-03 23:31:44 UTC (rev 4921)
@@ -69,12 +69,18 @@
* of active lease on server side. Default value is "true".
*/
public static final String TIE_TO_LEASE =3D "tieToLease";
+ =
/**
* Key to determine whether to stop ConnectionValidator when PING fails.
* Default value is "true".
*/
public static final String STOP_LEASE_ON_FAILURE =3D "stopLeaseOnFailur=
e";
=
+ /**
+ * Key to determine value of disconnectTimeout upon connection failure.
+ */
+ public static final String FAILURE_DISCONNECT_TIMEOUT =3D "failureDisco=
nnectTimeout";
+ =
// Static -------------------------------------------------------------=
--------------------------
=
private static boolean trace =3D log.isTraceEnabled();
@@ -234,6 +240,7 @@
private boolean tieToLease =3D true;
private boolean stopLeaseOnFailure =3D true;
private int pingTimeout;
+ private int failureDisconnectTimeout =3D -1;
private boolean isValid;
private Timer timer;
=
@@ -404,7 +411,7 @@
=
public String toString()
{
- return "ConnectionValidator[" + clientInvoker + ", pingPeriod=3D" + =
pingPeriod + " ms]";
+ return "ConnectionValidator[" + Integer.toHexString(System.identityH=
ashCode(this)) + ":" + clientInvoker + ", pingPeriod=3D" + pingPeriod + " m=
s]";
}
=
// Package protected --------------------------------------------------=
--------------------------
@@ -498,6 +505,28 @@
" to a boolean: must be a String");
}
}
+ =
+ o =3D config.get(FAILURE_DISCONNECT_TIMEOUT);
+ if (o !=3D null)
+ {
+ if (o instanceof String)
+ {
+ try
+ {
+ failureDisconnectTimeout =3D Integer.valueOf(((String) o=
)).intValue();
+ }
+ catch (Exception e)
+ {
+ log.warn(this + " could not convert " + FAILURE_DISCONNE=
CT_TIMEOUT + " value" +
+ " to an int: " + o);
+ }
+ }
+ else
+ {
+ log.warn(this + " could not convert " + FAILURE_DISCONNECT_=
TIMEOUT + " value" +
+ " to an int: must be a String");
+ }
+ }
}
}
=
@@ -638,6 +667,7 @@
{
public void run()
{
+ log.debug(this + " calling " + listener + ".handleConnec=
tionException()");
listener.handleConnectionException(t, client);
}
}.start();
@@ -679,7 +709,7 @@
=
if (!isValid)
{
- log.debug(ConnectionValidator.this + "'s connections is invali=
d");
+ log.debug(ConnectionValidator.this + "'s connection is invalid=
");
=
notifyListeners(new Exception("Could not connect to server!"));
=
@@ -690,7 +720,8 @@
=
if (invoker !=3D null)
{
- invoker.terminateLease(null, client.getDisconnectTimeout=
());
+ int disconnectTimeout =3D (failureDisconnectTimeout =3D=
=3D -1) ? client.getDisconnectTimeout() : failureDisconnectTimeout;
+ invoker.terminateLease(null, disconnectTimeout);
log.debug(ConnectionValidator.this + " shut down lease p=
inger");
}
else
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remot=
ing/Lease.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Le=
ase.java 2009-04-03 23:21:48 UTC (rev 4920)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Le=
ase.java 2009-04-03 23:31:44 UTC (rev 4921)
@@ -219,6 +219,7 @@
}
else
{
+ log.debug("requestPayload =3D=3D null, calling ConnectionNotifier=
.connectionTerminated()");
notifier.connectionTerminated(locatorURL, clientSessionId, null);
}
}
Modified: remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remot=
ing/LeasePinger.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Le=
asePinger.java 2009-04-03 23:21:48 UTC (rev 4920)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/main/org/jboss/remoting/Le=
asePinger.java 2009-04-03 23:31:44 UTC (rev 4921)
@@ -81,6 +81,7 @@
HashMap metadata =3D null;
=
// If disconnectTimeout =3D=3D 0, skip network i/o.
+ log.debug(this + ": disconnectTimeout: " + disconnectTimeout);
if (disconnectTimeout !=3D 0)
{
if (disconnectTimeout > 0)
Copied: remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/r=
emoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java (from =
rev 4914, remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connecti=
on/ConnectionValidatorDisconnectTimeoutTestCase.java)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remot=
ing/connection/ConnectionValidatorDisconnectTimeoutTestCase.java =
(rev 0)
+++ remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remot=
ing/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2009-04-03=
23:31:44 UTC (rev 4921)
@@ -0,0 +1,592 @@
+/*
+ * 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.connection;
+
+import java.io.IOException;
+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.ClientDisconnectedException;
+import org.jboss.remoting.ConnectionListener;
+import org.jboss.remoting.ConnectionValidator;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.InvokerRegistry;
+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.ServerFactory;
+import org.jboss.remoting.transport.socket.SocketServerInvoker;
+
+
+/**
+ * Unit test for JBREM-1112.
+ * =
+ * @author Ron Sigal
+ * @version =
+ *
+ * Copyright Apr 3, 2009
+ *
+ */
+public class ConnectionValidatorDisconnectTimeoutTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(ConnectionValidatorDisco=
nnectTimeoutTestCase.class);
+ =
+ private static boolean firstTime =3D true;
+ =
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+ protected TestConnectionListener serverConnectionListener;
+
+ =
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testDefaultUnary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testDefaultFirstBinary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, 500);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testDefaultSecondBinary() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroInvokerLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ String clientLocatorURI =3D locatorURI;
+ clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D0";
+ InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.removeConnectionListener(clientConnectionListener);
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroInvokerLocator() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ String clientLocatorURI =3D locatorURI;
+ clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D10000";
+ InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroConfig() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ clientConfig.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "0"=
);
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroConfig() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ clientConfig.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "10=
000");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ client.addConnectionListener(clientConnectionListener, new HashMap()=
);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testZeroMetadata() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ HashMap metadata =3D new HashMap();
+ metadata.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "0");
+ client.addConnectionListener(clientConnectionListener, metadata);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(8000);
+ assertTrue(serverConnectionListener.notified);
+ assertNull(serverConnectionListener.throwable);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ public void testNonZeroMetadata() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.ENABLE_LEASE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install ConnectionListener.
+ TestConnectionListener clientConnectionListener =3D new TestConnecti=
onListener("CLIENT");
+ HashMap metadata =3D new HashMap();
+ metadata.put(ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT, "10000"=
);
+ client.addConnectionListener(clientConnectionListener, metadata);
+ =
+ // Wait for broken connection and test.
+ Thread.sleep(4000);
+ assertTrue(serverConnectionListener.notified);
+ assertTrue(serverConnectionListener.throwable instanceof ClientDisco=
nnectedException);
+ assertTrue(clientConnectionListener.notified);
+ assertTrue(clientConnectionListener.throwable instanceof Exception);
+ assertEquals("Could not connect to server!", ((Exception)clientConne=
ctionListener.throwable).getMessage());
+ =
+ 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
+ {
+ InvokerRegistry.registerInvokerFactories("socket", org.jboss.remotin=
g.transport.socket.TransportClientFactory.class, TestServerInvokerFactory.c=
lass);
+ host =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ String metadata =3D System.getProperty("remoting.metadata");
+ if (metadata !=3D null)
+ {
+ locatorURI +=3D "/?" + metadata;
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ config.put("leasePeriod", "1000");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ serverConnectionListener =3D new TestConnectionListener("SERVER");
+ connector.addConnectionListener(serverConnectionListener);
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ static class TestServerInvoker extends SocketServerInvoker
+ {
+ public TestServerInvoker(InvokerLocator locator, Map configuration)
+ {
+ super(locator, configuration); =
+ }
+
+ public Object invoke(InvocationRequest invocation) throws Throwable
+ {
+ Object param =3D invocation.getParameter();
+
+ // check to see if this is a is alive ping
+ if ("$PING$".equals(param))
+ {
+ Map metadata =3D invocation.getRequestPayload();
+ if (metadata !=3D null)
+ {
+ String invokerSessionId =3D (String) metadata.get(INVOKER_S=
ESSION_ID);
+ if (invokerSessionId !=3D null)
+ {
+ // Comes from ConnectionValidator configured to tie vali=
dation with lease.
+ log.info(this + " responding FALSE to $PING$ for invoker=
sessionId " + invokerSessionId);
+ return Boolean.FALSE;
+ }
+ }
+ }
+
+ return super.invoke(invocation);
+ }
+ }
+ =
+ =
+ public static class TestServerInvokerFactory implements ServerFactory
+ {
+ public ServerInvoker createServerInvoker(InvokerLocator locator, Map=
config) throws IOException
+ {
+ return new TestServerInvoker(locator, config);
+ }
+
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+
+ =
+ static class TestConnectionListener implements ConnectionListener
+ {
+ public boolean notified;
+ public Throwable throwable;
+ String name;
+ =
+ TestConnectionListener(String name)
+ {
+ this.name =3D name;
+ }
+ =
+ public void handleConnectionException(Throwable throwable, Client cl=
ient)
+ {
+ notified =3D true;
+ this.throwable =3D throwable;
+ log.info(this + " NOTIFIED, throwable =3D " + throwable);
+ }
+ =
+ public String toString()
+ {
+ return "TestConnectionListener[" + name + "]";
+ }
+ }
+}
\ No newline at end of file
--===============0117744571263987094==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 4 00:37:09 2009
Content-Type: multipart/mixed; boundary="===============4707211129098102071=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4922 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config.
Date: Sat, 04 Apr 2009 00:37:09 -0400
Message-ID:
--===============4707211129098102071==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-04 00:37:08 -0400 (Sat, 04 Apr 2009)
New Revision: 4922
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/config=
/ConfigTestMarshaller.java
Log:
JBREM-1102: Corrected log message.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall=
/config/ConfigTestMarshaller.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/confi=
g/ConfigTestMarshaller.java 2009-04-03 23:31:44 UTC (rev 4921)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/marshall/confi=
g/ConfigTestMarshaller.java 2009-04-04 04:37:08 UTC (rev 4922)
@@ -59,7 +59,7 @@
=
public static boolean ok(int count)
{
- log.info("wrote: " + wrote + ", count: " + count);
+ log.info("wrote: " + wrote + ", cloned: " + cloned);
return wrote && cloned =3D=3D count;
}
=
--===============4707211129098102071==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 4 00:40:19 2009
Content-Type: multipart/mixed; boundary="===============2363707260456150170=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4923 -
remoting2/branches/2.2/src/main/org/jboss/remoting.
Date: Sat, 04 Apr 2009 00:40:18 -0400
Message-ID:
--===============2363707260456150170==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-04 00:40:18 -0400 (Sat, 04 Apr 2009)
New Revision: 4923
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/MicroRemoteClientInvo=
ker.java
Log:
JBREM-1102: getMarshaller() and getUnMarshaller() can look in configuration=
map as well as InvokerLocator.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/MicroRemoteCli=
entInvoker.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/MicroRemoteClientInv=
oker.java 2009-04-04 04:37:08 UTC (rev 4922)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/MicroRemoteClientInv=
oker.java 2009-04-04 04:40:18 UTC (rev 4923)
@@ -72,7 +72,7 @@
if (marshaller =3D=3D null)
{
// try by locator (in case marshaller class name specified)
- marshaller =3D MarshalFactory.getMarshaller(getLocator(), getClas=
sLoader());
+ marshaller =3D MarshalFactory.getMarshaller(getLocator(), getClas=
sLoader(), configuration);
if (marshaller =3D=3D null)
{
// need to have a marshaller, so create a default one
@@ -103,7 +103,7 @@
}
=
// try by locator (in case unmarshaller class name specified)
- unmarshaller =3D MarshalFactory.getUnMarshaller(getLocator(), get=
ClassLoader());
+ unmarshaller =3D MarshalFactory.getUnMarshaller(getLocator(), get=
ClassLoader(), configuration);
if (unmarshaller =3D=3D null)
{
unmarshaller =3D MarshalFactory.getUnMarshaller(getDataType(),=
getSerializationType());
@@ -465,11 +465,12 @@
{
if (dataType =3D=3D null)
{
- dataType =3D getDataType(getLocator());
- if (dataType =3D=3D null)
+ String localDataType =3D getDataType(getLocator());
+ if (localDataType =3D=3D null)
{
- dataType =3D getDefaultDataType();
+ localDataType =3D getDefaultDataType();
}
+ dataType =3D localDataType;
}
return dataType;
}
--===============2363707260456150170==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 4 17:41:14 2009
Content-Type: multipart/mixed; boundary="===============7264739818456998617=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4924 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection.
Date: Sat, 04 Apr 2009 17:40:11 -0400
Message-ID:
--===============7264739818456998617==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-04 17:40:11 -0400 (Sat, 04 Apr 2009)
New Revision: 4924
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Conn=
ectionValidatorTestCase.java
Log:
JBREM-1082: Subclassed Client returns non-null configuration map.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connecti=
on/ConnectionValidatorTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorTestCase.java 2009-04-04 04:40:18 UTC (rev 4923)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorTestCase.java 2009-04-04 21:40:11 UTC (rev 4924)
@@ -2,6 +2,7 @@
=
import java.io.IOException;
import java.net.MalformedURLException;
+import java.util.HashMap;
import java.util.Map;
=
import junit.framework.TestCase;
@@ -23,7 +24,7 @@
ConnectionValidator cv =3D new ConnectionValidator(new Client() {
public Map getConfiguration()
{
- return null;
+ return new HashMap();
}
=
public ClientInvoker getInvoker()
--===============7264739818456998617==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 4 23:55:08 2009
Content-Type: multipart/mixed; boundary="===============2379060303424324274=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4925 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection.
Date: Sat, 04 Apr 2009 23:55:07 -0400
Message-ID:
--===============2379060303424324274==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-04 23:55:07 -0400 (Sat, 04 Apr 2009)
New Revision: 4925
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Conn=
ectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: Fixed InvokerLocator in a couple of places to accommodate metad=
ata.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connecti=
on/ConnectionValidatorDisconnectTimeoutTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-04 21:40:11 UTC (rev=
4924)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-05 03:55:07 UTC (rev=
4925)
@@ -225,8 +225,9 @@
=
// Create client.
String clientLocatorURI =3D locatorURI;
- clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + Client.USE_ALL_PARAMS + "=3Dtrue";
clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D0";
+ log.info("clientLocatorURI: " + clientLocatorURI);
InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
HashMap clientConfig =3D new HashMap();
clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
@@ -268,8 +269,9 @@
=
// Create client.
String clientLocatorURI =3D locatorURI;
- clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + Client.USE_ALL_PARAMS + "=3Dtrue";
clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D10000";
+ log.info("clientLocatorURI: " + clientLocatorURI);
InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
HashMap clientConfig =3D new HashMap();
clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
@@ -478,11 +480,11 @@
InvokerRegistry.registerInvokerFactories("socket", org.jboss.remotin=
g.transport.socket.TransportClientFactory.class, TestServerInvokerFactory.c=
lass);
host =3D InetAddress.getLocalHost().getHostAddress();
port =3D PortUtil.findFreePort(host);
- locatorURI =3D getTransport() + "://" + host + ":" + port;
+ locatorURI =3D getTransport() + "://" + host + ":" + port + "/?x=3Dx=
";
String metadata =3D System.getProperty("remoting.metadata");
if (metadata !=3D null)
{
- locatorURI +=3D "/?" + metadata;
+ locatorURI +=3D "&" + metadata;
}
serverLocator =3D new InvokerLocator(locatorURI);
log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
--===============2379060303424324274==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 4 23:56:21 2009
Content-Type: multipart/mixed; boundary="===============7960655275764732599=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4926 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection.
Date: Sat, 04 Apr 2009 23:56:21 -0400
Message-ID:
--===============7960655275764732599==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-04 23:56:21 -0400 (Sat, 04 Apr 2009)
New Revision: 4926
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/Conn=
ectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: Fixed InvokerLocator in a couple of places to accommodate metad=
ata.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connecti=
on/ConnectionValidatorDisconnectTimeoutTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-05 03:55:07 UTC (rev=
4925)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-05 03:56:21 UTC (rev=
4926)
@@ -225,8 +225,9 @@
=
// Create client.
String clientLocatorURI =3D locatorURI;
- clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + Client.USE_ALL_PARAMS + "=3Dtrue";
clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D0";
+ log.info("clientLocatorURI: " + clientLocatorURI);
InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
HashMap clientConfig =3D new HashMap();
clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
@@ -268,8 +269,9 @@
=
// Create client.
String clientLocatorURI =3D locatorURI;
- clientLocatorURI +=3D "/?" + Client.USE_ALL_PARAMS + "=3Dtrue";
+ clientLocatorURI +=3D "&" + Client.USE_ALL_PARAMS + "=3Dtrue";
clientLocatorURI +=3D "&" + ConnectionValidator.FAILURE_DISCONNECT_T=
IMEOUT + "=3D10000";
+ log.info("clientLocatorURI: " + clientLocatorURI);
InvokerLocator clientLocator =3D new InvokerLocator(clientLocatorURI=
);
HashMap clientConfig =3D new HashMap();
clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
@@ -478,11 +480,11 @@
InvokerRegistry.registerInvokerFactories("socket", org.jboss.remotin=
g.transport.socket.TransportClientFactory.class, TestServerInvokerFactory.c=
lass);
host =3D InetAddress.getLocalHost().getHostAddress();
port =3D PortUtil.findFreePort(host);
- locatorURI =3D getTransport() + "://" + host + ":" + port;
+ locatorURI =3D getTransport() + "://" + host + ":" + port + "/?x=3Dx=
";
String metadata =3D System.getProperty("remoting.metadata");
if (metadata !=3D null)
{
- locatorURI +=3D "/?" + metadata;
+ locatorURI +=3D "&" + metadata;
}
serverLocator =3D new InvokerLocator(locatorURI);
log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
--===============7960655275764732599==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 00:14:26 2009
Content-Type: multipart/mixed; boundary="===============8800046161612672417=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4927 - in
remoting2/branches: 2.x/src/main/org/jboss/remoting and 1 other directory.
Date: Sun, 05 Apr 2009 00:14:26 -0400
Message-ID:
--===============8800046161612672417==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 00:14:26 -0400 (Sun, 05 Apr 2009)
New Revision: 4927
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.j=
ava
remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.j=
ava
Log:
JBREM-1082: Removed mistakenly added second extraction of "NumberOfCallRetr=
ies" value from configuration map.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionVali=
dator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-05 03:56:21 UTC (rev 4926)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-05 04:14:26 UTC (rev 4927)
@@ -205,12 +205,6 @@
". Using default value " + DEFAULT_PING_TIMEOUT);
}
}
- o =3D config.get("NumberOfCallRetries");
- if (o !=3D null)
- {
- localConfig.put("NumberOfCallRetries", o);
- }
-
}
=
if (localConfig.get(ServerInvoker.TIMEOUT) =3D=3D null)
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionVali=
dator.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-05 03:56:21 UTC (rev 4926)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionValidator.=
java 2009-04-05 04:14:26 UTC (rev 4927)
@@ -205,11 +205,6 @@
". Using default value " + DEFAULT_PING_TIMEOUT);
}
}
- o =3D config.get("NumberOfCallRetries");
- if (o !=3D null)
- {
- localConfig.put("NumberOfCallRetries", o);
- }
}
=
if (localConfig.get(ServerInvoker.TIMEOUT) =3D=3D null)
--===============8800046161612672417==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:12:49 2009
Content-Type: multipart/mixed; boundary="===============4151294415900344568=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4928 -
remoting2/branches/2.x.
Date: Sun, 05 Apr 2009 02:12:49 -0400
Message-ID:
--===============4151294415900344568==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:12:48 -0400 (Sun, 05 Apr 2009)
New Revision: 4928
Modified:
remoting2/branches/2.x/build.xml
Log:
JBREM-139: Added automated servlet transport tests.
Modified: remoting2/branches/2.x/build.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/build.xml 2009-04-05 04:14:26 UTC (rev 4927)
+++ remoting2/branches/2.x/build.xml 2009-04-05 06:12:48 UTC (rev 4928)
@@ -217,8 +217,9 @@
=
-
-
+
+ =
+
=
@@ -1612,6 +1613,400 @@
=
+
+
+
+
+
+
+
+ jboss home: ${jboss.home}
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+ Going to sleep for ${as.startup.time} seconds
+
+
+
+
+
+
+
+
+
+
+
+ Going to sleep for ${as.startup.time} seconds
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
--===============4151294415900344568==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:14:14 2009
Content-Type: multipart/mixed; boundary="===============2575317873774039568=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4929 -
remoting2/branches/2.x.
Date: Sun, 05 Apr 2009 02:14:14 -0400
Message-ID:
--===============2575317873774039568==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:14:13 -0400 (Sun, 05 Apr 2009)
New Revision: 4929
Added:
remoting2/branches/2.x/local.properties
Log:
JBREM-139: Local properties for automated servlet transport tests.
Added: remoting2/branches/2.x/local.properties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/local.properties (rev 0)
+++ remoting2/branches/2.x/local.properties 2009-04-05 06:14:13 UTC (rev 49=
29)
@@ -0,0 +1,4 @@
+jboss.home=3Dc://cygwin/home/rsigal/workspace.new/jboss-as-parent-trunk/bu=
ild/output/jboss-5.0.0.GA
+as.startup.time=3D220
+as.shutdown.time=3D10
+shell=3Dc:/cygwin/bin/sh.exe
\ No newline at end of file
--===============2575317873774039568==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:18:00 2009
Content-Type: multipart/mixed; boundary="===============2116548253160352739=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4930 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet.
Date: Sun, 05 Apr 2009 02:18:00 -0400
Message-ID:
--===============2116548253160352739==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:18:00 -0400 (Sun, 05 Apr 2009)
New Revision: 4930
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/MBeanServerJBossTestClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/MBeanServerPlatformTestClient.java
Log:
JBREM-139: Moved MBeanServer tests to their own directory.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/MBeanServerJBossTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/MBeanServerJBossTestClient.java 2009-04-05 06:14:13 UTC (rev 4929)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/MBeanServerJBossTestClient.java 2009-04-05 06:18:00 UTC (rev 4930)
@@ -1,43 +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.transport.servlet;
-
-/**
- * Used to test JBREM-746.
- * =
- * @author Ron Sigal
- * @version $Revision: 1.1 $
- *
- * Copyright Nov 29, 2007
- *
- */
-public class MBeanServerJBossTestClient extends MBeanServerSelectionTestPa=
rent
-{
-
- protected String getDefaultDomain()
- {
- return "jboss";
- }
-
-}
-
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/MBeanServerPlatformTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/MBeanServerPlatformTestClient.java 2009-04-05 06:14:13 UTC (rev 4929)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/MBeanServerPlatformTestClient.java 2009-04-05 06:18:00 UTC (rev 4930)
@@ -1,44 +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.transport.servlet;
-
-/**
- * =
- * Used to test JBREM-746.
- * =
- * @author Ron Sigal
- * @version $Revision: 1.1 $
- *
- * Copyright Nov 29, 2007
- *
- */
-public class MBeanServerPlatformTestClient extends MBeanServerSelectionTes=
tParent
-{
-
- protected String getDefaultDomain()
- {
- return "platform";
- }
-
-}
-
--===============2116548253160352739==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:18:46 2009
Content-Type: multipart/mixed; boundary="===============0644552531937916899=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4931 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet.
Date: Sun, 05 Apr 2009 02:18:46 -0400
Message-ID:
--===============0644552531937916899==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:18:46 -0400 (Sun, 05 Apr 2009)
New Revision: 4931
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/remoting-servlet-service.xml
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/remoting-servlet-server-invoker-service.xml
Log:
JBREM-139: Renamed remoting-servlet-server-invoker-service.xml to remoting-=
servlet-service.xml.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/remoting-servlet-server-invoker-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/remoting-servlet-server-invoker-service.xml 2009-04-05 06:18:00 UTC (re=
v 4930)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/remoting-servlet-server-invoker-service.xml 2009-04-05 06:18:46 UTC (re=
v 4931)
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
- servlet://localhost:8080/servlet-invoker/ServerInvokerSer=
vlet
-
-
-
-
-
- org.jboss.test.remoting=
.transport.web.WebInvocationHandler
-
-
-
-
-
-
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/remoting-servlet-service.xml (from rev 4674, remoting2/branches/2.x=
/src/tests/org/jboss/test/remoting/transport/servlet/remoting-servlet-serve=
r-invoker-service.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/remoting-servlet-service.xml 2009-04-05 06:18:46 UTC (rev 4931)
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+ servlet://localhost:8080/servlet-invoker/ServerInvokerSer=
vlet
+
+
+
+
+
+ org.jboss.test.remoting=
.transport.web.WebInvocationHandler
+
+
+
+
+
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+ =
Name: svn:eol-style
+ native
--===============0644552531937916899==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:19:24 2009
Content-Type: multipart/mixed; boundary="===============2171129023302279629=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4932 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet.
Date: Sun, 05 Apr 2009 02:19:23 -0400
Message-ID:
--===============2171129023302279629==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:19:23 -0400 (Sun, 05 Apr 2009)
New Revision: 4932
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/server.xml
Log:
JBREM-139: Created a single server.xml for all servlet tests.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/server.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/server.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/server.xml 2009-04-05 06:19:23 UTC (rev 4932)
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--===============2171129023302279629==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:20:10 2009
Content-Type: multipart/mixed; boundary="===============2657582338852258056=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4933 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet:
callback and 1 other directory.
Date: Sun, 05 Apr 2009 02:20:09 -0400
Message-ID:
--===============2657582338852258056==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:20:09 -0400 (Sun, 05 Apr 2009)
New Revision: 4933
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/CallbackTestClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/TestInvocationHandler.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/remoting-servlet-service.xml
Log:
JBREM-139: Moved callback tests to their own directory.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/callback/CallbackTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/CallbackTestClient.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/CallbackTestClient.java 2009-04-05 06:20:09 UTC (rev 4933)
@@ -0,0 +1,141 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.callback;
+
+import java.util.HashMap;
+
+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.InvokerLocator;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.HandleCallbackException;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+
+
+/**
+ * Unit test for pull callbacks over servlet transport: JBREM-1079.
+ * =
+ * @author Ron Sigal
+ * @version =
+ *
+ * Copyright Jan 16, 2009
+ *
+ */
+public class CallbackTestClient extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(CallbackTestClient.class=
);
+ =
+ private static boolean firstTime =3D 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 =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testMethod() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Create client.
+ locatorURI =3D "servlet://localhost:8080/servlet-invoker/ServerInvok=
erServlet";
+ locatorURI +=3D "/?createUniqueObjectName=3Dtrue&useAllParams=3Dtrue=
&blockingMode=3Dblocking";
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test connection.
+ log.info("result: " + client.invoke("abc"));
+ assertEquals(null, client.invoke("abc"));
+ log.info("connection is good");
+ =
+ // Install client side callback handlers.
+ TestCallbackHandler callbackHandler1 =3D new TestCallbackHandler();
+ TestCallbackHandler callbackHandler2 =3D new TestCallbackHandler();
+ HashMap metadata =3D new HashMap();
+ client.addListener(callbackHandler1, metadata);
+ client.addListener(callbackHandler2, metadata);
+ =
+ // Request callbacks.
+ int COUNT =3D 100;
+ for (int i =3D 0; i < COUNT; i++)
+ {
+ client.invoke("callback");
+ }
+ =
+ log.info("sleeping for 2000 ms");
+ Thread.sleep(2000);
+ log.info("waking up");
+ =
+ // Verify all callbacks arrived.
+ assertEquals(COUNT, callbackHandler1.counter);
+ assertEquals(COUNT, callbackHandler1.counter);
+ =
+ client.removeListener(callbackHandler1);
+ client.removeListener(callbackHandler2);
+ client.disconnect();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ static class TestCallbackHandler implements InvokerCallbackHandler
+ {
+ public int counter;
+ =
+ public void handleCallback(Callback callback) throws HandleCallbackE=
xception
+ {
+ counter++;
+ } =
+ }
+}
\ No newline at end of file
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/callback/TestInvocationHandler.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/TestInvocationHandler.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/TestInvocationHandler.java 2009-04-05 06:20:09 UTC (rev 4933)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, 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.callback;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+import javax.management.MBeanServer;
+
+import org.apache.log4j.Logger;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+
+public class TestInvocationHandler implements ServerInvocationHandler
+{
+ private static Logger log =3D Logger.getLogger(TestInvocationHandler.cl=
ass);
+ private HashSet listeners =3D new HashSet();
+ =
+ public void addListener(InvokerCallbackHandler callbackHandler)
+ {
+ listeners.add(callbackHandler);
+ log.info("added " + callbackHandler);
+ }
+
+ public Object invoke(InvocationRequest invocation) throws Throwable
+ {
+ log.debug("invocation: " + invocation.getParameter());
+ Iterator it =3D listeners.iterator();
+ Callback callback =3D new Callback("callback");
+ while (it.hasNext())
+ {
+ InvokerCallbackHandler handler =3D (InvokerCallbackHandler) it.ne=
xt();
+ handler.handleCallback(callback);
+ log.debug("sent callback to " + handler);
+ }
+ return null;
+ }
+
+ public void removeListener(InvokerCallbackHandler callbackHandler)
+ { =
+ listeners.remove(callbackHandler);
+ log.info("removed " + callbackHandler);
+ }
+
+ public void setInvoker(ServerInvoker invoker)
+ {
+ }
+
+ public void setMBeanServer(MBeanServer server)
+ {
+ }
+}
+
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/callback/remoting-servlet-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/remoting-servlet-service.xml 2009-04-05 06:20:09 UTC (rev 4933)
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+ servlet://localhost:8080/servlet-invoker/ServerInvokerSer=
vlet/?createUniqueObjectName=3Dtrue&useAllParams=3Dtrue&blockingMod=
e=3Dblocking
+
+
+
+
+
+ org.jboss.test.remoting=
.transport.servlet.callback.TestInvocationHandler
+
+
+
+
+
+
+
--===============2657582338852258056==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:21:03 2009
Content-Type: multipart/mixed; boundary="===============1450002598396088081=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4934 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet:
marshal and 1 other directory.
Date: Sun, 05 Apr 2009 02:21:03 -0400
Message-ID:
--===============1450002598396088081==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:21:03 -0400 (Sun, 05 Apr 2009)
New Revision: 4934
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/marshal/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/marshal/ServletConfigurationMapTestClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/marshal/remoting-servlet-service.xml
Log:
JBREM-139: Moved marshalling tests to their own directory.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/marshal/ServletConfigurationMapTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/marshal/ServletConfigurationMapTestClient.java =
(rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/marshal/ServletConfigurationMapTestClient.java 2009-04-05 06:21:03 UTC =
(rev 4934)
@@ -0,0 +1,71 @@
+/*
+ * 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 Ron Sigal
+ * @version =
+ *
+ * Copyright Mar 21, 2009
+ *
+ */
+public class ServletConfigurationMapTestClient extends ConfigurationMapTes=
tParent
+{
+ protected static Logger log =3D Logger.getLogger(ServletConfigurationMa=
pTestClient.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 Ex=
ception
+ {
+ locatorURI =3D "servlet://localhost:8080/servlet-invoker/ServerInvok=
erServlet/?" +
+ "marshaller=3Dorg.jboss.test.remoting.marshall.config.C=
onfigTestMarshaller&" +
+ "unmarshaller=3Dorg.jboss.test.remoting.marshall.config=
.ConfigTestUnmarshaller";
+ =
+ log.info("setting InvokerLocator to " + locatorURI);
+ }
+}
+
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/marshal/remoting-servlet-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/marshal/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/marshal/remoting-servlet-service.xml 2009-04-05 06:21:03 UTC (rev 4934)
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+ servlet://localhost:8080/servlet-invoker/ServerInvokerSer=
vlet/?marshaller=3Dorg.jboss.test.remoting.marshall.config.ConfigTestMarsha=
ller&unmarshaller=3Dorg.jboss.test.remoting.marshall.config.ConfigTestU=
nmarshaller
+
+
+
+
+
+ org.jboss.test.remoting=
.marshall.config.TestInvocationHandler
+
+
+
+
+
+
+
--===============1450002598396088081==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:21:40 2009
Content-Type: multipart/mixed; boundary="===============4741634691471673855=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4935 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet:
mbeanserver and 1 other directories.
Date: Sun, 05 Apr 2009 02:21:40 -0400
Message-ID:
--===============4741634691471673855==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:21:40 -0400 (Sun, 05 Apr 2009)
New Revision: 4935
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/jboss/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/jboss/MBeanServerJBossTestClient.java
Log:
JBREM-139: Moved MBeanServer tests to their own directory.
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/mbeanserver/jboss/MBeanServerJBossTestClient.java (from rev 4674, r=
emoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/M=
BeanServerJBossTestClient.java)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/jboss/MBeanServerJBossTestClient.java =
(rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/jboss/MBeanServerJBossTestClient.java 2009-04-05 06:21:40 U=
TC (rev 4935)
@@ -0,0 +1,45 @@
+
+/*
+* 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.servlet.mbeanserver.jboss;
+
+import org.jboss.test.remoting.transport.servlet.MBeanServerSelectionTestP=
arent;
+
+/**
+ * Used to test JBREM-746.
+ * =
+ * @author Ron Sigal
+ * @version $Revision: 1.1 $
+ *
+ * Copyright Nov 29, 2007
+ *
+ */
+public class MBeanServerJBossTestClient extends MBeanServerSelectionTestPa=
rent
+{
+
+ protected String getDefaultDomain()
+ {
+ return "jboss";
+ }
+
+}
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/mbeanserver/jboss/MBeanServerJBossTestClient.java
___________________________________________________________________
Name: svn:mergeinfo
+ =
--===============4741634691471673855==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:22:01 2009
Content-Type: multipart/mixed; boundary="===============2688041736645014711=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4936 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/mbeanserver/jboss:
WEB-INF and 1 other directory.
Date: Sun, 05 Apr 2009 02:22:01 -0400
Message-ID:
--===============2688041736645014711==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:22:01 -0400 (Sun, 05 Apr 2009)
New Revision: 4936
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/jboss/WEB-INF/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/jboss/WEB-INF/web.xml
Log:
JBREM-139: Moved MBeanServer tests to their own directory.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/mbeanserver/jboss/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/jboss/WEB-INF/web.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/jboss/WEB-INF/web.xml 2009-04-05 06:22:01 UTC (rev 4936)
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ ServerInvokerServlet
+ The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+
+ org.jboss.remoting.transport.servlet.web.ServerInvo=
kerServlet
+
+ invokerName
+ jboss.remoting:host=3Dlocalhost,port=3D8080,servi=
ce=3Dinvoker,transport=3Dservlet
+ The servlet server invoker
+
+
+ 1
+
+
+ ServerInvokerServlet
+ /ServerInvokerServlet/*
+
+
+
--===============2688041736645014711==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:22:22 2009
Content-Type: multipart/mixed; boundary="===============1193178492979059307=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4937 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/mbeanserver:
platform and 1 other directories.
Date: Sun, 05 Apr 2009 02:22:22 -0400
Message-ID:
--===============1193178492979059307==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:22:22 -0400 (Sun, 05 Apr 2009)
New Revision: 4937
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/platform/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/platform/WEB-INF/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/platform/WEB-INF/web.xml
Log:
JBREM-139: Moved MBeanServer tests to their own directory.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ervlet/mbeanserver/platform/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/platform/WEB-INF/web.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/platform/WEB-INF/web.xml 2009-04-05 06:22:22 UTC (rev 4937)
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ ServerInvokerServlet
+ The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+
+ org.jboss.remoting.transport.servlet.web.ServerInvo=
kerServlet
+
+ invokerName
+ jboss.remoting:host=3Dlocalhost,port=3D8080,servi=
ce=3Dinvoker,transport=3Dservlet
+ The servlet server invoker
+
+
+ mbeanServer
+ *platform*
+ The servlet server invoker
+
+ 1
+
+
+ ServerInvokerServlet
+ /ServerInvokerServlet/*
+
+
+
--===============1193178492979059307==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:22:48 2009
Content-Type: multipart/mixed; boundary="===============0166403941703637146=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4938 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/mbeanserver/platform.
Date: Sun, 05 Apr 2009 02:22:47 -0400
Message-ID:
--===============0166403941703637146==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:22:47 -0400 (Sun, 05 Apr 2009)
New Revision: 4938
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/mbeanserver/platform/MBeanServerPlatformTestClient.java
Log:
JBREM-139: Moved MBeanServer tests to their own directory.
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/mbeanserver/platform/MBeanServerPlatformTestClient.java (from rev 4=
674, remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/ser=
vlet/MBeanServerPlatformTestClient.java)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/platform/MBeanServerPlatformTestClient.java =
(rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/mbeanserver/platform/MBeanServerPlatformTestClient.java 2009-04-05 06:2=
2:47 UTC (rev 4938)
@@ -0,0 +1,46 @@
+
+/*
+* 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.servlet.mbeanserver.platform;
+
+import org.jboss.test.remoting.transport.servlet.MBeanServerSelectionTestP=
arent;
+
+/**
+ * =
+ * Used to test JBREM-746.
+ * =
+ * @author Ron Sigal
+ * @version $Revision: 1.1 $
+ *
+ * Copyright Nov 29, 2007
+ *
+ */
+public class MBeanServerPlatformTestClient extends MBeanServerSelectionTes=
tParent
+{
+
+ protected String getDefaultDomain()
+ {
+ return "platform";
+ }
+
+}
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/mbeanserver/platform/MBeanServerPlatformTestClient.java
___________________________________________________________________
Name: svn:mergeinfo
+ =
--===============0166403941703637146==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:23:24 2009
Content-Type: multipart/mixed; boundary="===============2255406599951647556=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4939 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/multihome.
Date: Sun, 05 Apr 2009 02:23:24 -0400
Message-ID:
--===============2255406599951647556==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:23:24 -0400 (Sun, 05 Apr 2009)
New Revision: 4939
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/multihome/remoting-servlet-service.xml
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/multihome/remoting-servlet-invoker-service.xml
Log:
JBREM-139: Renamed remoting-servlet-invoker-service.xml to remoting-servlet=
-service.xml.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/multihome/remoting-servlet-invoker-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/remoting-servlet-invoker-service.xml 2009-04-05 06:22:47 UTC =
(rev 4938)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/remoting-servlet-invoker-service.xml 2009-04-05 06:23:24 UTC =
(rev 4939)
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
- servlet://multihome/servlet-invoker/ServerInvokerServlet/=
?homes=3D127.0.0.1:8081!192.168.2.2:8082!10.11.14.75:8083
-
-
-
-
-
- org.jboss.test.remoting=
.multihome.TestInvocationHandler
-
-
-
-
-
-
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/multihome/remoting-servlet-service.xml (from rev 4674, remoting2/br=
anches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/multihome/re=
moting-servlet-invoker-service.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/remoting-servlet-service.xml 2009-04-05 06:23:24 UTC (rev 493=
9)
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+ servlet://multihome/servlet-invoker/ServerInvokerServlet/=
?homes=3Dlocalhost:7071!localhost:7082!localhost:7093
+
+
+
+
+
+ org.jboss.test.remoting=
.multihome.TestInvocationHandler
+
+
+
+
+
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/multihome/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:mergeinfo
+ =
--===============2255406599951647556==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:25:47 2009
Content-Type: multipart/mixed; boundary="===============7022293962021410373=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4940 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/multihome.
Date: Sun, 05 Apr 2009 02:25:42 -0400
Message-ID:
--===============7022293962021410373==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:25:42 -0400 (Sun, 05 Apr 2009)
New Revision: 4940
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/multihome/server.xml
Log:
JBREM-139: Created a single server.xml in .../servlet directory for all ser=
vlet tests.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/multihome/server.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/server.xml 2009-04-05 06:23:24 UTC (rev 4939)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/server.xml 2009-04-05 06:25:42 UTC (rev 4940)
@@ -1,199 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- =
-
-
-
-
-
-
-
-
-
- =
-
- =
-
-
-
-
-
-
-
-
-
-
-
-
-
- =
-
-
-
-
-
-
-
-
- =
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--===============7022293962021410373==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:26:14 2009
Content-Type: multipart/mixed; boundary="===============1564191229266989377=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4941 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/multihome.
Date: Sun, 05 Apr 2009 02:26:14 -0400
Message-ID:
--===============1564191229266989377==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:26:14 -0400 (Sun, 05 Apr 2009)
New Revision: 4941
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/multihome/ServletMultihomeTestClient.java
Log:
JBREM-139: Changed InvokerLocator.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/multihome/ServletMultihomeTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/ServletMultihomeTestClient.java 2009-04-05 06:25:42 UTC (rev =
4940)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/ServletMultihomeTestClient.java 2009-04-05 06:26:14 UTC (rev =
4941)
@@ -45,7 +45,7 @@
protected void setupServer() throws Exception
{
locatorURI =3D getTransport() + "://" + InvokerLocator.MULTIHOME + g=
etPath() + "/?";
- locatorURI +=3D InvokerLocator.CONNECT_HOMES_KEY + "=3D127.0.0.1:808=
1!192.168.2.2:8082!10.11.14.75:8083";
+ locatorURI +=3D InvokerLocator.CONNECT_HOMES_KEY + "=3Dlocalhost:707=
1!localhost:7082!localhost:7093";
serverLocator =3D new InvokerLocator(locatorURI);
log.info("server locator: " + locatorURI);
}
--===============1564191229266989377==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:26:50 2009
Content-Type: multipart/mixed; boundary="===============4201999980603461797=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4942 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines.
Date: Sun, 05 Apr 2009 02:26:50 -0400
Message-ID:
--===============4201999980603461797==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:26:50 -0400 (Sun, 05 Apr 2009)
New Revision: 4942
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/nopreservelines/remoting-servlet-service.xml
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/nopreservelines/remoting-servlet-invoker-service.xml
Log:
JBREM-139: Renamed remoting-servlet-invoker-service.xml to remoting-servlet=
-service.xml.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/nopreservelines/remoting-servlet-invoker-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/remoting-servlet-invoker-service.xml 2009-04-05 06:26:1=
4 UTC (rev 4941)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/remoting-servlet-invoker-service.xml 2009-04-05 06:26:5=
0 UTC (rev 4942)
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
- localhost
- 8080
- false
- servlet-invoker/ServerInvokerServl=
et
-
-
- org.jboss.test.remoting.transpo=
rt.servlet.lines.TestInvocationHandler
-
-
-
-
-
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/nopreservelines/remoting-servlet-service.xml (from rev 4674, remoti=
ng2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/nopres=
ervelines/remoting-servlet-invoker-service.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/remoting-servlet-service.xml (r=
ev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/remoting-servlet-service.xml 2009-04-05 06:26:50 UTC (r=
ev 4942)
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+ localhost
+ 8080
+ false
+ servlet-invoker/ServerInvokerServl=
et
+
+
+ org.jboss.test.remoting.transpo=
rt.servlet.nopreservelines.TestInvocationHandler
+
+
+
+
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/nopreservelines/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:mergeinfo
+ =
--===============4201999980603461797==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:27:42 2009
Content-Type: multipart/mixed; boundary="===============2987059870678292411=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4943 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines/WEB-INF.
Date: Sun, 05 Apr 2009 02:27:41 -0400
Message-ID:
--===============2987059870678292411==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:27:41 -0400 (Sun, 05 Apr 2009)
New Revision: 4943
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/nopreservelines/WEB-INF/web.xml
Log:
JBREM-139: Replaced locatorUrl with invokerName.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/nopreservelines/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/WEB-INF/web.xml 2009-04-05 06:26:50 UTC (rev 4942)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/WEB-INF/web.xml 2009-04-05 06:27:41 UTC (rev 4943)
@@ -15,10 +15,8 @@
org.jboss.remoting.transport.servlet.web.ServerInvo=
kerServlet
- locatorUrl
-
- servlet://localhost:8080/servlet-invoker/ServerInvokerServl=
et
-
+ invokerName
+ jboss.remoting:host=3Dlocalhost,port=3D8080,servi=
ce=3Dinvoker,transport=3DservletThe servlet server invoker1
--===============2987059870678292411==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:27:56 2009
Content-Type: multipart/mixed; boundary="===============7171835066726263955=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4944 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines.
Date: Sun, 05 Apr 2009 02:27:55 -0400
Message-ID:
--===============7171835066726263955==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:27:55 -0400 (Sun, 05 Apr 2009)
New Revision: 4944
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/preservelines/remoting-servlet-service.xml
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/preservelines/remoting-servlet-invoker-service.xml
Log:
JBREM-139: Renamed remoting-servlet-invoker-service.xml to remoting-servlet=
-service.xml.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/preservelines/remoting-servlet-invoker-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/remoting-servlet-invoker-service.xml 2009-04-05 06:27:41 =
UTC (rev 4943)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/remoting-servlet-invoker-service.xml 2009-04-05 06:27:55 =
UTC (rev 4944)
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
- localhost
- 8080
- true
- servlet-invoker/ServerInvokerServl=
et
-
-
- org.jboss.test.remoting.transpo=
rt.servlet.lines.TestInvocationHandler
-
-
-
-
-
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/preservelines/remoting-servlet-service.xml (from rev 4674, remoting=
2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preserve=
lines/remoting-servlet-invoker-service.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/remoting-servlet-service.xml (rev=
0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/remoting-servlet-service.xml 2009-04-05 06:27:55 UTC (rev=
4944)
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+ localhost
+ 8080
+ true
+ servlet-invoker/ServerInvokerServl=
et
+
+
+ org.jboss.test.remoting.transpo=
rt.servlet.preservelines.TestInvocationHandler
+
+
+
+
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/preservelines/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:mergeinfo
+ =
--===============7171835066726263955==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:28:13 2009
Content-Type: multipart/mixed; boundary="===============1079806724494648947=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4945 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF.
Date: Sun, 05 Apr 2009 02:28:12 -0400
Message-ID:
--===============1079806724494648947==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:28:12 -0400 (Sun, 05 Apr 2009)
New Revision: 4945
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/preservelines/WEB-INF/web.xml
Log:
JBREM-139: Replaced locatorUrl with invokerName.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/preservelines/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/WEB-INF/web.xml 2009-04-05 06:27:55 UTC (rev 4944)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/WEB-INF/web.xml 2009-04-05 06:28:12 UTC (rev 4945)
@@ -15,10 +15,8 @@
org.jboss.remoting.transport.servlet.web.ServerInvo=
kerServlet
- locatorUrl
-
- servlet://localhost:8080/servlet-invoker/ServerInvokerServl=
et
-
+ invokerName
+ jboss.remoting:host=3Dlocalhost,port=3D8080,servi=
ce=3Dinvoker,transport=3DservletThe servlet server invoker1
--===============1079806724494648947==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:29:13 2009
Content-Type: multipart/mixed; boundary="===============5967292920107729938=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4946 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
Date: Sun, 05 Apr 2009 02:29:13 -0400
Message-ID:
--===============5967292920107729938==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:29:12 -0400 (Sun, 05 Apr 2009)
New Revision: 4946
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/keystore
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/truststore
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/.keystore
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/.truststore
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/truststore
Log:
JBREM-139: Rename .keystore and .truststore to keystore and truststore.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/ssl/.keystore
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/ssl/.truststore
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/ssl/keystore (from rev 4674, remoting2/branches/2.x/src/tests/org/j=
boss/test/remoting/transport/servlet/ssl/.keystore)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/ssl/keystore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+ =
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/ssl/truststore
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/ssl/truststore (from rev 4674, remoting2/branches/2.x/src/tests/org=
/jboss/test/remoting/transport/servlet/ssl/.truststore)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/ssl/truststore
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:mergeinfo
+ =
--===============5967292920107729938==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:29:31 2009
Content-Type: multipart/mixed; boundary="===============9172739413785248037=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4947 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
Date: Sun, 05 Apr 2009 02:29:31 -0400
Message-ID:
--===============9172739413785248037==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:29:30 -0400 (Sun, 05 Apr 2009)
New Revision: 4947
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/remoting-servlet-service.xml
Removed:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/remoting-servlet-invoker-service.xml
Log:
JBREM-139: Renamed remoting-servlet-invoker-service.xml to remoting-servlet=
-service.xml.
Deleted: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport=
/servlet/ssl/remoting-servlet-invoker-service.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/remoting-servlet-invoker-service.xml 2009-04-05 06:29:12 UTC (rev 4=
946)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/remoting-servlet-invoker-service.xml 2009-04-05 06:29:30 UTC (rev 4=
947)
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
- sslservlet://localhost:8443/servlet-invoker/ServerInvoker=
Servlet
-
-
-
-
-
- org.jboss.test.remoting=
.transport.web.WebInvocationHandler
-
-
-
-
-
-
-
Copied: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/=
servlet/ssl/remoting-servlet-service.xml (from rev 4674, remoting2/branches=
/2.x/src/tests/org/jboss/test/remoting/transport/servlet/ssl/remoting-servl=
et-invoker-service.xml)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/remoting-servlet-service.xml 2009-04-05 06:29:30 UTC (rev 4947)
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+ sslservlet://localhost:8443/servlet-invoker/ServerInvoker=
Servlet
+
+
+
+
+
+ org.jboss.test.remoting=
.transport.web.WebInvocationHandler
+
+
+
+
+
+
+
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/ssl/remoting-servlet-service.xml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:mergeinfo
+ =
Name: svn:eol-style
+ native
--===============9172739413785248037==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:31:18 2009
Content-Type: multipart/mixed; boundary="===============5142741916157592080=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4948 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
Date: Sun, 05 Apr 2009 02:31:17 -0400
Message-ID:
--===============5142741916157592080==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:31:17 -0400 (Sun, 05 Apr 2009)
New Revision: 4948
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/SSLServletClientAddressTestClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/SSLServletInvokerTestClient.java
Log:
JBREM-139: Renamed .keystore and .truststore to keystore and truststore.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/ssl/SSLServletClientAddressTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/SSLServletClientAddressTestClient.java 2009-04-05 06:29:30 UTC (rev=
4947)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/SSLServletClientAddressTestClient.java 2009-04-05 06:31:17 UTC (rev=
4948)
@@ -21,7 +21,7 @@
protected void addExtraServerConfig(Map config)
{
config.put(SSLSocketBuilder.REMOTING_KEY_STORE_TYPE, "JKS");
- String keyStoreFilePath =3D this.getClass().getResource(".keystore")=
.getFile();
+ String keyStoreFilePath =3D this.getClass().getResource("keystore").=
getFile();
config.put(SSLSocketBuilder.REMOTING_KEY_STORE_FILE_PATH, keyStoreFi=
lePath);
config.put(SSLSocketBuilder.REMOTING_KEY_STORE_PASSWORD, "unit-tests=
-server");
}
@@ -29,7 +29,7 @@
protected void addExtraClientConfig(Map config)
{
config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE, "JKS");
- String trustStoreFilePath =3D this.getClass().getResource(".truststo=
re").getFile();
+ String trustStoreFilePath =3D this.getClass().getResource("truststor=
e").getFile();
config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH, trustSto=
reFilePath);
config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD, "unit-tes=
ts-client");
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/ssl/SSLServletInvokerTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/SSLServletInvokerTestClient.java 2009-04-05 06:29:30 UTC (rev 4947)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/SSLServletInvokerTestClient.java 2009-04-05 06:31:17 UTC (rev 4948)
@@ -13,7 +13,7 @@
{
// since doing basic (using default ssl server socket factory)
// need to set the system properties to the truststore
- String trustStoreFilePath =3D this.getClass().getResource(".truststo=
re").getFile();
+ String trustStoreFilePath =3D this.getClass().getResource("truststor=
e").getFile();
System.setProperty("javax.net.ssl.trustStore", trustStoreFilePath);
=
=
--===============5142741916157592080==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:37:51 2009
Content-Type: multipart/mixed; boundary="===============6033237375724113868=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4949 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/callback.
Date: Sun, 05 Apr 2009 02:37:51 -0400
Message-ID:
--===============6033237375724113868==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:37:50 -0400 (Sun, 05 Apr 2009)
New Revision: 4949
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/
Log:
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/callback
___________________________________________________________________
Name: svn:ignore
+ WEB-INF
--===============6033237375724113868==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:38:02 2009
Content-Type: multipart/mixed; boundary="===============6526091748559283071=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4950 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet/marshal.
Date: Sun, 05 Apr 2009 02:38:02 -0400
Message-ID:
--===============6526091748559283071==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:38:02 -0400 (Sun, 05 Apr 2009)
New Revision: 4950
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/marshal/
Log:
Property changes on: remoting2/branches/2.x/src/tests/org/jboss/test/remoti=
ng/transport/servlet/marshal
___________________________________________________________________
Name: svn:ignore
+ WEB-INF
--===============6526091748559283071==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:42:16 2009
Content-Type: multipart/mixed; boundary="===============4169394647645836419=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4951 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servlet:
multihome and 2 other directories.
Date: Sun, 05 Apr 2009 02:42:15 -0400
Message-ID:
--===============4169394647645836419==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:42:15 -0400 (Sun, 05 Apr 2009)
New Revision: 4951
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/multihome/readme.txt
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/nopreservelines/readme.txt
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/preservelines/readme.txt
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/servl=
et/readme.txt
Log:
JBREM-139: Added not that JBREM-139 is done.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/multihome/readme.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/readme.txt 2009-04-05 06:38:02 UTC (rev 4950)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/multihome/readme.txt 2009-04-05 06:42:15 UTC (rev 4951)
@@ -2,6 +2,11 @@
manually (JBREM-139 has been created to automate this). Until then, here =
are the instructions for running
the tests manually.
=
+*******************************************************
+***** JBREM-139 is done. *****
+***** See tests.functional.servlet in build.xml. *****
+*******************************************************
+
servlet
=
1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or bui=
ld) to the deploy directory.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/nopreservelines/readme.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/readme.txt 2009-04-05 06:38:02 UTC (rev 4950)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/nopreservelines/readme.txt 2009-04-05 06:42:15 UTC (rev 4951)
@@ -2,6 +2,11 @@
manually (JBREM-139 has been created to automate this). Until then, here =
are the instructions for running
the tests manually.
=
+*******************************************************
+***** JBREM-139 is done. *****
+***** See tests.functional.servlet in build.xml. *****
+*******************************************************
+
servlet
=
1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or bui=
ld) to the deploy directory.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/preservelines/readme.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/readme.txt 2009-04-05 06:38:02 UTC (rev 4950)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/preservelines/readme.txt 2009-04-05 06:42:15 UTC (rev 4951)
@@ -2,6 +2,11 @@
manually (JBREM-139 has been created to automate this). Until then, here =
are the instructions for running
the tests manually.
=
+*******************************************************
+***** JBREM-139 is done. *****
+***** See tests.functional.servlet in build.xml. *****
+*******************************************************
+
servlet
=
1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or bui=
ld) to the deploy directory.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/servlet/readme.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/readme.txt 2009-04-05 06:38:02 UTC (rev 4950)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/serv=
let/readme.txt 2009-04-05 06:42:15 UTC (rev 4951)
@@ -2,6 +2,11 @@
manually (JBREM-139 has been created to automate this). Until then, here =
are the instructions for running
the tests manually.
=
+*******************************************************
+***** JBREM-139 is done. *****
+***** See tests.functional.servlet in build.xml. *****
+*******************************************************
+
servlet
=
1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or bui=
ld) to the deploy directory.
--===============4169394647645836419==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:49:41 2009
Content-Type: multipart/mixed; boundary="===============7951007492055364947=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4952 -
remoting2/branches/2.2.
Date: Sun, 05 Apr 2009 02:49:40 -0400
Message-ID:
--===============7951007492055364947==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:49:39 -0400 (Sun, 05 Apr 2009)
New Revision: 4952
Modified:
remoting2/branches/2.2/build.xml
Log:
JBREM-139: Added tests for servlet transport.
Modified: remoting2/branches/2.2/build.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/build.xml 2009-04-05 06:42:15 UTC (rev 4951)
+++ remoting2/branches/2.2/build.xml 2009-04-05 06:49:39 UTC (rev 4952)
@@ -30,7 +30,8 @@
=
-
+
+ =
=
@@ -907,6 +908,212 @@
=
+
+
+
+
+
+ =
+
+ jboss home: ${jboss.home}
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Going to sleep for ${as.startup.time} seconds
+
+
+
+
+
+
+
+
+
+
+
+ Going to sleep for ${as.startup.time} seconds
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
--===============7951007492055364947==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:50:48 2009
Content-Type: multipart/mixed; boundary="===============0334317121086367560=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4953 -
remoting2/branches/2.2.
Date: Sun, 05 Apr 2009 02:50:47 -0400
Message-ID:
--===============0334317121086367560==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:50:47 -0400 (Sun, 05 Apr 2009)
New Revision: 4953
Added:
remoting2/branches/2.2/local.properties
Log:
JBREM-139: Local properties for servlet transport tests.
Added: remoting2/branches/2.2/local.properties
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/local.properties (rev 0)
+++ remoting2/branches/2.2/local.properties 2009-04-05 06:50:47 UTC (rev 49=
53)
@@ -0,0 +1,4 @@
+jboss.home=3Dc://cygwin/home/rsigal/workspace.new/EAP_4_3_0_GA_CP03/build/=
output/jboss-4.3.0.GA_CP03
+as.startup.time=3D220
+as.shutdown.time=3D10
+shell=3Dc:/cygwin/bin/sh.exe
\ No newline at end of file
--===============0334317121086367560==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:55:49 2009
Content-Type: multipart/mixed; boundary="===============0841565737642872782=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4954 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/WEB-INF.
Date: Sun, 05 Apr 2009 02:55:48 -0400
Message-ID:
--===============0841565737642872782==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:55:48 -0400 (Sun, 05 Apr 2009)
New Revision: 4954
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/WEB-INF/web.xml
Log:
JBREM-139: Removed extraneous parameters from locatorUrl.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transpor=
t/servlet/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/WEB-INF/web.xml 2009-04-05 06:50:47 UTC (rev 4953)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/WEB-INF/web.xml 2009-04-05 06:55:48 UTC (rev 4954)
@@ -16,7 +16,7 @@
org.jboss.remoting.transport.servlet.web.ServerInvo=
kerServletlocatorUrl
- servlet://localhost:8080/servlet-invoker/ServerIn=
vokerServlet/?marshaller=3Dorg.jboss.test.remoting.marshall.config.ConfigTe=
stMarshaller&unmarshaller=3Dorg.jboss.test.remoting.marshall.config.Con=
figTestUnmarshaller
+ servlet://localhost:8080/servlet-invoker/ServerIn=
vokerServlet/?createUniqueObjectName=3DtrueThe servlet server invoker locator url
1
--===============0841565737642872782==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:56:08 2009
Content-Type: multipart/mixed; boundary="===============2457649188470561813=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4955 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet.
Date: Sun, 05 Apr 2009 02:56:08 -0400
Message-ID:
--===============2457649188470561813==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:56:08 -0400 (Sun, 05 Apr 2009)
New Revision: 4955
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/server.xml
Log:
JBREM-139: Created a single server.xml in .../servlet directory for all ser=
vlet tests.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/s=
ervlet/server.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/server.xml (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/server.xml 2009-04-05 06:56:08 UTC (rev 4955)
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+ =
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--===============2457649188470561813==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:57:08 2009
Content-Type: multipart/mixed; boundary="===============5454795385419099668=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4956 - in
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback:
WEB-INF and 1 other directory.
Date: Sun, 05 Apr 2009 02:57:08 -0400
Message-ID:
--===============5454795385419099668==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:57:08 -0400 (Sun, 05 Apr 2009)
New Revision: 4956
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/WEB-INF/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/callback/WEB-INF/web.xml
Log:
JBREM-139: Moved callback tests to their own directory.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/s=
ervlet/callback/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/WEB-INF/web.xml (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/callback/WEB-INF/web.xml 2009-04-05 06:57:08 UTC (rev 4956)
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ ServerInvokerServlet
+ The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+
+ org.jboss.remoting.transport.servlet.web.ServerInvo=
kerServlet
+
+ locatorUrl
+ servlet://localhost:8080/servlet-invoker/ServerIn=
vokerServlet/?createUniqueObjectName=3Dtrue&useAllParams=3Dtrue&blo=
ckingMode=3Dblocking
+ The servlet server invoker locator url
+
+ 1
+
+
+ ServerInvokerServlet
+ /ServerInvokerServlet/*
+
+
+
--===============5454795385419099668==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:57:26 2009
Content-Type: multipart/mixed; boundary="===============4694864243362352018=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4957 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
Date: Sun, 05 Apr 2009 02:57:26 -0400
Message-ID:
--===============4694864243362352018==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:57:26 -0400 (Sun, 05 Apr 2009)
New Revision: 4957
Removed:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/server.xml
Log:
JBREM-139: Created a single server.xml in .../servlet directory for all ser=
vlet tests.
Deleted: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport=
/servlet/ssl/server.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/server.xml 2009-04-05 06:57:08 UTC (rev 4956)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/server.xml 2009-04-05 06:57:26 UTC (rev 4957)
@@ -1,169 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =
-
-
-
-
-
-
-
-
- =
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--===============4694864243362352018==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:58:01 2009
Content-Type: multipart/mixed; boundary="===============8848914632882048576=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4958 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/WEB-INF.
Date: Sun, 05 Apr 2009 02:58:01 -0400
Message-ID:
--===============8848914632882048576==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:58:00 -0400 (Sun, 05 Apr 2009)
New Revision: 4958
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/WEB-INF/web.xml
Log:
JBREM-139: Removed commented locatorUrl entry.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transpor=
t/servlet/ssl/WEB-INF/web.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/WEB-INF/web.xml 2009-04-05 06:57:26 UTC (rev 4957)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/WEB-INF/web.xml 2009-04-05 06:58:00 UTC (rev 4958)
@@ -18,11 +18,6 @@
locatorUrlsslservlet://localhost:8443/servlet-invoker/Serve=
rInvokerServlet/?createUniqueObjectName=3DtrueThe servlet server invoker locator url
-
1
--===============8848914632882048576==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:58:47 2009
Content-Type: multipart/mixed; boundary="===============8392435437664556189=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4959 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
Date: Sun, 05 Apr 2009 02:58:47 -0400
Message-ID:
--===============8392435437664556189==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:58:47 -0400 (Sun, 05 Apr 2009)
New Revision: 4959
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/ssl/SSLServletInvokerTestClient.java
Log:
JBREM-139: Renamed .truststore to truststore.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transpor=
t/servlet/ssl/SSLServletInvokerTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/SSLServletInvokerTestClient.java 2009-04-05 06:58:00 UTC (rev 4958)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/ssl/SSLServletInvokerTestClient.java 2009-04-05 06:58:47 UTC (rev 4959)
@@ -13,7 +13,7 @@
{
// since doing basic (using default ssl server socket factory)
// need to set the system properties to the truststore
- String trustStoreFilePath =3D this.getClass().getResource(".truststo=
re").getFile();
+ String trustStoreFilePath =3D this.getClass().getResource("truststor=
e").getFile();
System.setProperty("javax.net.ssl.trustStore", trustStoreFilePath);
=
=
--===============8392435437664556189==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 5 02:59:03 2009
Content-Type: multipart/mixed; boundary="===============8233957367904508128=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4960 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet.
Date: Sun, 05 Apr 2009 02:59:03 -0400
Message-ID:
--===============8233957367904508128==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:59:03 -0400 (Sun, 05 Apr 2009)
New Revision: 4960
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl=
et/readme.txt
Log:
JBREM-139: Added note that JBREM-139 is done.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transpor=
t/servlet/readme.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/readme.txt 2009-04-05 06:58:47 UTC (rev 4959)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv=
let/readme.txt 2009-04-05 06:59:03 UTC (rev 4960)
@@ -2,6 +2,11 @@
manually (JBREM-139 has been created to automate this). Until then, here =
are the instructions for running
the tests manually.
=
+*******************************************************
+***** JBREM-139 is done. *****
+***** See tests.functional.servlet in build.xml. *****
+*******************************************************
+
servlet
=
1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or bui=
ld) to the deploy directory.
--===============8233957367904508128==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 7 03:55:05 2009
Content-Type: multipart/mixed; boundary="===============8547746510809243711=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4961 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection.
Date: Tue, 07 Apr 2009 03:55:05 -0400
Message-ID:
--===============8547746510809243711==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-07 03:55:05 -0400 (Tue, 07 Apr 2009)
New Revision: 4961
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Conn=
ectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: Doubled lease period to 2000 ms.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connecti=
on/ConnectionValidatorDisconnectTimeoutTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-05 06:59:03 UTC (rev=
4960)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/Con=
nectionValidatorDisconnectTimeoutTestCase.java 2009-04-07 07:55:05 UTC (rev=
4961)
@@ -490,7 +490,7 @@
log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
HashMap config =3D new HashMap();
config.put(InvokerLocator.FORCE_REMOTE, "true");
- config.put("leasePeriod", "1000");
+ config.put("leasePeriod", "2000");
addExtraServerConfig(config);
connector =3D new Connector(serverLocator, config);
connector.create();
--===============8547746510809243711==--
From jboss-remoting-commits at lists.jboss.org Wed Apr 8 03:34:23 2009
Content-Type: multipart/mixed; boundary="===============6333339976091949509=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4962 - in
remoting2/branches/2.2/src/tests/org/jboss/test/remoting: datatype and 1
other directory.
Date: Wed, 08 Apr 2009 03:34:23 -0400
Message-ID:
--===============6333339976091949509==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-08 03:34:23 -0400 (Wed, 08 Apr 2009)
New Revision: 4962
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataTy=
peRaceTestCase.java
Log:
JBREM-1109: New unit test.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/Da=
taTypeRaceTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java 2009-04-08 07:34:23 UTC (rev 4962)
@@ -0,0 +1,252 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.datatype;
+
+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.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.MicroRemoteClientInvoker;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.ClientInvoker;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+
+import EDU.oswego.cs.dl.util.concurrent.Rendezvous;
+
+
+/**
+ * Unit test for JBREM-1109.
+ * =
+ * @author Ron Sigal
+ * @version =
+ *
+ * Copyright Apr 8, 2009
+ *
+ */
+public class DataTypeRaceTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(DataTypeRaceTestCase.cla=
ss);
+ =
+ private static boolean firstTime =3D true;
+ protected static String dataType;
+ =
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+ protected Object lock =3D new Object();
+
+ =
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testDataTypeRace() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test datatype race.
+ MicroRemoteClientInvoker clientInvoker =3D (MicroRemoteClientInvoker=
) client.getInvoker();
+ =
+ int THREADS =3D 2000;
+ TestThread[] threads =3D new TestThread[THREADS];
+ Rendezvous startBarrier =3D new Rendezvous(THREADS);
+ Rendezvous stopBarrier =3D new Rendezvous(THREADS + 1);
+ =
+ log.info(getName() + " creating " + THREADS + " threads");
+ for (int i =3D 0; i < THREADS; i++)
+ {
+ threads[i] =3D new TestThread(clientInvoker, startBarrier, stopBa=
rrier, i);
+ threads[i].start();
+ }
+ =
+ log.info(getName() + " waiting on stopBarrier");
+ rendezvous(stopBarrier);
+ log.info(getName() + " checking threads");
+ =
+ for (int i =3D 0; i < THREADS; i++)
+ {
+ assertTrue("failure in " + threads[i], threads[i].ok);
+ }
+ =
+ 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 =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ String metadata =3D System.getProperty("remoting.metadata");
+ if (metadata !=3D null)
+ {
+ locatorURI +=3D "/?" + metadata;
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ protected static void rendezvous(Rendezvous barrier)
+ {
+ while (true)
+ {
+ try
+ {
+ barrier.rendezvous(null);
+ break;
+ }
+ catch (InterruptedException e1)
+ {
+
+ }
+ }
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+ =
+ static class TestThread extends Thread
+ {
+ String name;
+ ClientInvoker clientInvoker;
+ Rendezvous startBarrier;
+ Rendezvous stopBarrier;
+ InvocationRequest request =3D new InvocationRequest(null, null, "abc=
", null, null, null);
+ boolean ok;
+ =
+ public TestThread(ClientInvoker clientInvoker, Rendezvous startBarri=
er, Rendezvous stopBarrier, int number)
+ {
+ this.clientInvoker =3D clientInvoker;
+ this.startBarrier =3D startBarrier;
+ this.stopBarrier =3D stopBarrier;
+ name =3D "TestThread[" + number + "]";
+ }
+ =
+ public void run()
+ {
+// log.debug(this + " waiting on startBarrier");
+ rendezvous(startBarrier);
+// log.debug(this + " executing");
+ try
+ {
+ clientInvoker.invoke(request);
+// log.debug(this + " waiting on stopBarrier");
+ ok =3D true;
+ rendezvous(stopBarrier);
+// log.debug(this + " done");
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ rendezvous(stopBarrier);
+ }
+ }
+ =
+ public String toString()
+ {
+ return name;
+ }
+ }
+}
\ No newline at end of file
--===============6333339976091949509==--
From jboss-remoting-commits at lists.jboss.org Wed Apr 8 03:36:16 2009
Content-Type: multipart/mixed; boundary="===============7237780534661991096=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4963 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Wed, 08 Apr 2009 03:36:16 -0400
Message-ID:
--===============7237780534661991096==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-08 03:36:16 -0400 (Wed, 08 Apr 2009)
New Revision: 4963
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteClientInvo=
ker.java
Log:
JBREM-1109: getDataType() uses localDataType to avoid race.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteCli=
entInvoker.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteClientInv=
oker.java 2009-04-08 07:34:23 UTC (rev 4962)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteClientInv=
oker.java 2009-04-08 07:36:16 UTC (rev 4963)
@@ -509,11 +509,12 @@
{
if (dataType =3D=3D null)
{
- dataType =3D getDataType(getLocator());
- if (dataType =3D=3D null)
+ String localDataType =3D getDataType(getLocator());
+ if (localDataType =3D=3D null)
{
- dataType =3D getDefaultDataType();
+ localDataType =3D getDefaultDataType();
}
+ dataType =3D localDataType;
}
return dataType;
}
--===============7237780534661991096==--
From jboss-remoting-commits at lists.jboss.org Wed Apr 8 03:38:22 2009
Content-Type: multipart/mixed; boundary="===============8792006447907748463=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4964 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting: datatype and 1
other directory.
Date: Wed, 08 Apr 2009 03:38:22 -0400
Message-ID:
--===============8792006447907748463==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-08 03:38:21 -0400 (Wed, 08 Apr 2009)
New Revision: 4964
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataTy=
peRaceTestCase.java
Log:
JBREM-1109: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/Da=
taTypeRaceTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java 2009-04-08 07:38:21 UTC (rev 4964)
@@ -0,0 +1,252 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.datatype;
+
+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.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.MicroRemoteClientInvoker;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.ClientInvoker;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+
+import EDU.oswego.cs.dl.util.concurrent.Rendezvous;
+
+
+/**
+ * Unit test for JBREM-1109.
+ * =
+ * @author Ron Sigal
+ * @version =
+ *
+ * Copyright Apr 8, 2009
+ *
+ */
+public class DataTypeRaceTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(DataTypeRaceTestCase.cla=
ss);
+ =
+ private static boolean firstTime =3D true;
+ protected static String dataType;
+ =
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+ protected Object lock =3D new Object();
+
+ =
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testDataTypeRace() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Test datatype race.
+ MicroRemoteClientInvoker clientInvoker =3D (MicroRemoteClientInvoker=
) client.getInvoker();
+ =
+ int THREADS =3D 2000;
+ TestThread[] threads =3D new TestThread[THREADS];
+ Rendezvous startBarrier =3D new Rendezvous(THREADS);
+ Rendezvous stopBarrier =3D new Rendezvous(THREADS + 1);
+ =
+ log.info(getName() + " creating " + THREADS + " threads");
+ for (int i =3D 0; i < THREADS; i++)
+ {
+ threads[i] =3D new TestThread(clientInvoker, startBarrier, stopBa=
rrier, i);
+ threads[i].start();
+ }
+ =
+ log.info(getName() + " waiting on stopBarrier");
+ rendezvous(stopBarrier);
+ log.info(getName() + " checking threads");
+ =
+ for (int i =3D 0; i < THREADS; i++)
+ {
+ assertTrue("failure in " + threads[i], threads[i].ok);
+ }
+ =
+ 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 =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ String metadata =3D System.getProperty("remoting.metadata");
+ if (metadata !=3D null)
+ {
+ locatorURI +=3D "/?" + metadata;
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ protected static void rendezvous(Rendezvous barrier)
+ {
+ while (true)
+ {
+ try
+ {
+ barrier.rendezvous(null);
+ break;
+ }
+ catch (InterruptedException e1)
+ {
+
+ }
+ }
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+ =
+ static class TestThread extends Thread
+ {
+ String name;
+ ClientInvoker clientInvoker;
+ Rendezvous startBarrier;
+ Rendezvous stopBarrier;
+ InvocationRequest request =3D new InvocationRequest(null, null, "abc=
", null, null, null);
+ boolean ok;
+ =
+ public TestThread(ClientInvoker clientInvoker, Rendezvous startBarri=
er, Rendezvous stopBarrier, int number)
+ {
+ this.clientInvoker =3D clientInvoker;
+ this.startBarrier =3D startBarrier;
+ this.stopBarrier =3D stopBarrier;
+ name =3D "TestThread[" + number + "]";
+ }
+ =
+ public void run()
+ {
+// log.debug(this + " waiting on startBarrier");
+ rendezvous(startBarrier);
+// log.debug(this + " executing");
+ try
+ {
+ clientInvoker.invoke(request);
+// log.debug(this + " waiting on stopBarrier");
+ ok =3D true;
+ rendezvous(stopBarrier);
+// log.debug(this + " done");
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ rendezvous(stopBarrier);
+ }
+ }
+ =
+ public String toString()
+ {
+ return name;
+ }
+ }
+}
\ No newline at end of file
--===============8792006447907748463==--
From jboss-remoting-commits at lists.jboss.org Wed Apr 8 23:19:15 2009
Content-Type: multipart/mixed; boundary="===============5910448096533719720=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4965 -
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
Date: Wed, 08 Apr 2009 23:19:15 -0400
Message-ID:
--===============5910448096533719720==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: david.lloyd(a)jboss.com
Date: 2009-04-08 23:19:15 -0400 (Wed, 08 Apr 2009)
New Revision: 4965
Added:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
NotFoundException.java
Log:
Add a specific exception for the service-not-found situation
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Ser=
viceNotFoundException.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Servic=
eNotFoundException.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Servic=
eNotFoundException.java 2009-04-09 03:19:15 UTC (rev 4965)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
+
+import java.net.URI;
+
+/**
+ * Service not found. This exception is thrown when a service is looked u=
p which is not registered anywhere.
+ */
+public final class ServiceNotFoundException extends RemotingException {
+
+ private static final long serialVersionUID =3D -998858276817298658L;
+
+ private final URI serviceUri;
+
+ /**
+ * Constructs a ServiceNotFoundException with no detail messa=
ge. The cause is not initialized, and may
+ * subsequently be initialized by a call to {@link #initCause(Throwabl=
e) initCause}.
+ *
+ * @param uri the service URI that could not be found
+ */
+ public ServiceNotFoundException(final URI uri) {
+ serviceUri =3D uri;
+ }
+
+ /**
+ * Constructs a ServiceNotFoundException with the specified d=
etail message. The cause is not initialized, and
+ * may subsequently be initialized by a call to {@link #initCause(Thro=
wable) initCause}.
+ *
+ * @param uri the service URI that could not be found
+ * @param msg the detail message
+ */
+ public ServiceNotFoundException(final URI uri, final String msg) {
+ super(msg);
+ serviceUri =3D uri;
+ }
+
+ /**
+ * Constructs a ServiceNotFoundException with the specified c=
ause. The detail message is set to:
+ *
+ * (cause =3D=3D null ? null : cause.toString())
+ * (which typically contains the class and detail message of cause=
).
+ *
+ * @param uri the service URI that could not be found
+ * @param cause the cause (which is saved for later retrieval by the {=
@link #getCause()} method)
+ */
+ public ServiceNotFoundException(final URI uri, final Throwable cause) {
+ super(cause);
+ serviceUri =3D uri;
+ }
+
+ /**
+ * Constructs a ServiceNotFoundException with the specified d=
etail message and cause.
+ *
+ * @param uri the service URI that could not be found
+ * @param msg the detail message
+ * @param cause the cause (which is saved for later retrieval by the {=
@link #getCause()} method)
+ */
+ public ServiceNotFoundException(final URI uri, final String msg, final=
Throwable cause) {
+ super(msg, cause);
+ serviceUri =3D uri;
+ }
+
+ /**
+ * Get the service URI which could not be found.
+ *
+ * @return the service URI
+ */
+ public URI getServiceUri() {
+ return serviceUri;
+ }
+
+ /**
+ * Returns the detail message string of this throwable.
+ *
+ * @return the detail message string of this throwable
+ */
+ public String getMessage() {
+ return super.getMessage() + ": " + serviceUri;
+ }
+}
--===============5910448096533719720==--
From jboss-remoting-commits at lists.jboss.org Thu Apr 9 14:41:35 2009
Content-Type: multipart/mixed; boundary="===============0369943792960852590=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4966 -
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
Date: Thu, 09 Apr 2009 14:41:34 -0400
Message-ID:
--===============0369943792960852590==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: david.lloyd(a)jboss.com
Date: 2009-04-09 14:41:34 -0400 (Thu, 09 Apr 2009)
New Revision: 4966
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Handlea=
bleCloseable.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Request=
CancelHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Request=
Context.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Request=
Listener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
Context.java
Log:
Copyright
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
HandleableCloseable.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Handle=
ableCloseable.java 2009-04-09 03:19:15 UTC (rev 4965)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Handle=
ableCloseable.java 2009-04-09 18:41:34 UTC (rev 4966)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.io.Closeable;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
RequestCancelHandler.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Reques=
tCancelHandler.java 2009-04-09 03:19:15 UTC (rev 4965)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Reques=
tCancelHandler.java 2009-04-09 18:41:34 UTC (rev 4966)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
/**
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
RequestContext.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Reques=
tContext.java 2009-04-09 03:19:15 UTC (rev 4965)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Reques=
tContext.java 2009-04-09 18:41:34 UTC (rev 4966)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.io.IOException;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
RequestListener.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Reques=
tListener.java 2009-04-09 03:19:15 UTC (rev 4965)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Reques=
tListener.java 2009-04-09 18:41:34 UTC (rev 4966)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
/**
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
ServiceContext.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Servic=
eContext.java 2009-04-09 03:19:15 UTC (rev 4965)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Servic=
eContext.java 2009-04-09 18:41:34 UTC (rev 4966)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.util.concurrent.ConcurrentMap;
--===============0369943792960852590==--
From jboss-remoting-commits at lists.jboss.org Thu Apr 9 15:02:54 2009
Content-Type: multipart/mixed; boundary="===============3762217317924499016=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4967 -
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
Date: Thu, 09 Apr 2009 15:02:54 -0400
Message-ID:
--===============3762217317924499016==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: david.lloyd(a)jboss.com
Date: 2009-04-09 15:02:54 -0400 (Thu, 09 Apr 2009)
New Revision: 4967
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Abstrac=
tRequestListener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client.=
java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ClientC=
ontext.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ClientS=
ource.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseHa=
ndler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoin=
tImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/QueueEx=
ecutor.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remotin=
g.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
URI.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Version=
.java
Log:
copyright
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
AbstractRequestListener.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Abstra=
ctRequestListener.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Abstra=
ctRequestListener.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
/**
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
Client.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.io.IOException;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
ClientContext.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Context.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Context.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.util.concurrent.ConcurrentMap;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
ClientSource.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Source.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Source.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.io.IOException;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
CloseHandler.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseH=
andler.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseH=
andler.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
/**
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
EndpointImpl.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
ntImpl.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
ntImpl.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.io.Closeable;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
QueueExecutor.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/QueueE=
xecutor.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/QueueE=
xecutor.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.util.LinkedList;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
Remoting.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remoti=
ng.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remoti=
ng.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.io.IOException;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
ServiceURI.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Servic=
eURI.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Servic=
eURI.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
import java.net.URI;
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
Version.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Versio=
n.java 2009-04-09 18:41:34 UTC (rev 4966)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Versio=
n.java 2009-04-09 19:02:54 UTC (rev 4967)
@@ -1,3 +1,25 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
=
/**
--===============3762217317924499016==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 11 21:44:36 2009
Content-Type: multipart/mixed; boundary="===============1858877029343195295=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4968 -
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast.
Date: Sat, 11 Apr 2009 21:44:36 -0400
Message-ID:
--===============1858877029343195295==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-11 21:44:36 -0400 (Sat, 11 Apr 2009)
New Revision: 4968
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast/M=
ulticastDetector.java
remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast/M=
ulticastDetectorMBean.java
Log:
JBREM-1099: Added bufferSize attribute.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/detection/mult=
icast/MulticastDetector.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetector.java 2009-04-09 19:02:54 UTC (rev 4967)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetector.java 2009-04-12 01:44:36 UTC (rev 4968)
@@ -59,6 +59,7 @@
private int port =3D 2410;
private MulticastSocket socket;
private Listener listener =3D new Listener("Remoting Multicast Detector=
- Listener Thread: " + threadCounter++);
+ private int bufferSize =3D 10000;
=
=
/**
@@ -137,6 +138,17 @@
this.port =3D port;
}
=
+
+ public int getBufferSize()
+ {
+ return bufferSize;
+ }
+
+ public void setBufferSize(int bufferSize)
+ {
+ this.bufferSize =3D bufferSize;
+ }
+ =
/**
* called by MBeanServer to start the mbean lifecycle
*
@@ -347,7 +359,8 @@
=
public void run()
{
- byte[] buf =3D new byte[4000];
+ log.debug("using bufferSize: " + bufferSize);
+ byte[] buf =3D new byte[bufferSize];
DatagramPacket p =3D new DatagramPacket(buf, 0, buf.length);
//p.setAddress(addr);
//p.setPort(port);
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/detection/mult=
icast/MulticastDetectorMBean.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetectorMBean.java 2009-04-09 19:02:54 UTC (rev 4967)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetectorMBean.java 2009-04-12 01:44:36 UTC (rev 4968)
@@ -84,5 +84,15 @@
* @param defaultIP The IP that is used to broadcast detection messages=
on via multicast.
*/
void setDefaultIP(String defaultIP);
+ =
+ /**
+ * @return The size of the byte array in the DatagramPacket.
+ */
+ int getBufferSize();
+ =
+ /**
+ * @param bufferSize The size of the byte array in the DatagramPacket.
+ */
+ void setBufferSize(int bufferSize);
=
}
--===============1858877029343195295==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 11 21:46:00 2009
Content-Type: multipart/mixed; boundary="===============4185313674516225280=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4969 -
remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast.
Date: Sat, 11 Apr 2009 21:46:00 -0400
Message-ID:
--===============4185313674516225280==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-11 21:46:00 -0400 (Sat, 11 Apr 2009)
New Revision: 4969
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast/M=
ulticastDetector.java
remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast/M=
ulticastDetectorMBean.java
Log:
JBREM-1099: Added bufferSize attribute.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/detection/mult=
icast/MulticastDetector.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetector.java 2009-04-12 01:44:36 UTC (rev 4968)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetector.java 2009-04-12 01:46:00 UTC (rev 4969)
@@ -55,6 +55,7 @@
private int port =3D 2410;
private MulticastSocket socket;
private Listener listener =3D new Listener("Remoting Multicast Detector=
- Listener Thread: " + threadCounter++);
+ private int bufferSize =3D 10000;
=
=
/**
@@ -133,6 +134,17 @@
this.port =3D port;
}
=
+
+ public int getBufferSize()
+ {
+ return bufferSize;
+ }
+
+ public void setBufferSize(int bufferSize)
+ {
+ this.bufferSize =3D bufferSize;
+ }
+ =
/**
* called by MBeanServer to start the mbean lifecycle
*
@@ -210,6 +222,9 @@
if(socket !=3D null)
{
Detection msg =3D createDetection();
+ if (msg =3D=3D null)
+ return;
+ =
try
{
if(log.isTraceEnabled())
@@ -324,7 +339,8 @@
=
public void run()
{
- byte[] buf =3D new byte[4000];
+ log.debug("Using bufferSize: " + bufferSize);
+ byte[] buf =3D new byte[bufferSize];
DatagramPacket p =3D new DatagramPacket(buf, 0, buf.length);
//p.setAddress(addr);
//p.setPort(port);
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/detection/mult=
icast/MulticastDetectorMBean.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetectorMBean.java 2009-04-12 01:44:36 UTC (rev 4968)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/detection/multicast/=
MulticastDetectorMBean.java 2009-04-12 01:46:00 UTC (rev 4969)
@@ -84,5 +84,15 @@
* @param defaultIP The IP that is used to broadcast detection messages=
on via multicast.
*/
void setDefaultIP(String defaultIP);
+ =
+ /**
+ * @return The size of the byte array in the DatagramPacket.
+ */
+ int getBufferSize();
+ =
+ /**
+ * @param bufferSize The size of the byte array in the DatagramPacket.
+ */
+ void setBufferSize(int bufferSize);
=
}
--===============4185313674516225280==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 11 22:09:48 2009
Content-Type: multipart/mixed; boundary="===============5820504028413657750=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4970 -
remoting2/branches/2.2/docs/guide/en.
Date: Sat, 11 Apr 2009 22:09:48 -0400
Message-ID:
--===============5820504028413657750==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-11 22:09:48 -0400 (Sat, 11 Apr 2009)
New Revision: 4970
Modified:
remoting2/branches/2.2/docs/guide/en/chap5.xml
Log:
JBREM-1099: Added bufferSize attribute for MulticastDetector.
Modified: remoting2/branches/2.2/docs/guide/en/chap5.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-04-12 01:46:00 UTC =
(rev 4969)
+++ remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-04-12 02:09:48 UTC =
(rev 4970)
@@ -801,6 +801,9 @@
Address - The IP of the multi=
cast
group that the detector will join. The default will be that of the
DefaultIP if not explicitly set.
+ =
+ BufferSize - The size of the =
buffer used
+ by the MulticastSocket. The default is 10000.
=
If any of these are set programmatically, need to be done before=
the
detector is started (otherwise will use default values).
--===============5820504028413657750==--
From jboss-remoting-commits at lists.jboss.org Sat Apr 11 22:16:29 2009
Content-Type: multipart/mixed; boundary="===============4788283566400792475=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4971 -
remoting2/branches/2.x/docs/guide/en.
Date: Sat, 11 Apr 2009 22:16:28 -0400
Message-ID:
--===============4788283566400792475==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-11 22:16:28 -0400 (Sat, 11 Apr 2009)
New Revision: 4971
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-1099: Added "bufferSize" attribute for MulticastDetector; JBREM-1046:=
Added "unmarshalNullStream" for HTTPClientInvoker.
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-04-12 02:09:48 UTC =
(rev 4970)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-04-12 02:16:28 UTC =
(rev 4971)
@@ -900,6 +900,9 @@
Address - The IP of the multi=
cast
group that the detector will join. The default will be that of the
DefaultIP if not explicitly set.
+ =
+ BufferSize - The size of the =
buffer used
+ by the MulticastSocket. The default is 10000.
=
If any of these are set programmatically, need to be done before=
the
detector is started (otherwise will use default values).
@@ -6266,12 +6269,18 @@
=
org.jboss.remoting.transport.http.HTTPClientInvoker
-
+ =
NUMBER_OF_CALL_ATTEMPTS =
(actual
value is "numberOfCallAttempts"): This parameter is relevant only =
on the
client side, where it determines the maximum number of attempts th=
at
will be made to complete an invocation. The default value is 1.
=
+ UNMARSHAL_NULL_STREAM (ac=
tual value
+ is "unmarshalNullStream") - key indicating if
+ org.jboss.remoting.transport.http.HTTPClientInvoker
+ should make the call to UnMarshaller.read() when
+ the InputStream is null. The default value =
is
+ "true".
=
--===============4788283566400792475==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 01:33:54 2009
Content-Type: multipart/mixed; boundary="===============8737415494227945345=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4972 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Sun, 12 Apr 2009 01:33:53 -0400
Message-ID:
--===============8737415494227945345==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 01:33:53 -0400 (Sun, 12 Apr 2009)
New Revision: 4972
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.java
Log:
JBREM-1111: Wrapped timer.schedule() in try/catch in case Timer has shut it=
self down and needs to be recreated.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.ja=
va
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-12 02:16:28 UTC (rev 4971)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-12 05:33:53 UTC (rev 4972)
@@ -96,7 +96,17 @@
if(trace) { log.trace(this + " starting lease timer with ping period=
of " + pingPeriod); }
=
timerTask =3D new LeaseTimerTask(this);
- timer.schedule(timerTask, pingPeriod, pingPeriod);
+
+ try
+ {
+ timer.schedule(timerTask, pingPeriod, pingPeriod);
+ }
+ catch (IllegalStateException e)
+ {
+ log.debug("Unable to schedule TimerTask on existing Timer", e);
+ timer =3D new Timer(true);
+ timer.schedule(timerTask, pingPeriod, pingPeriod);
+ }
}
=
public void stopPing()
--===============8737415494227945345==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 01:37:05 2009
Content-Type: multipart/mixed; boundary="===============1840019920311106447=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4973 -
remoting2/branches/2.2/src/main/org/jboss/remoting.
Date: Sun, 12 Apr 2009 01:37:01 -0400
Message-ID:
--===============1840019920311106447==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 01:37:01 -0400 (Sun, 12 Apr 2009)
New Revision: 4973
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.java
Log:
JBREM-1111: Wrapped timer.schedule() in try/catch in case Timer has shut it=
self down and needs to be recreated.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.ja=
va
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-12 05:33:53 UTC (rev 4972)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/LeasePinger.java 200=
9-04-12 05:37:01 UTC (rev 4973)
@@ -62,7 +62,17 @@
if(trace) { log.trace(this + " starting lease timer with ping period=
of " + pingPeriod); }
=
timerTask =3D new LeaseTimerTask(this);
- timer.schedule(timerTask, pingPeriod, pingPeriod);
+
+ try
+ {
+ timer.schedule(timerTask, pingPeriod, pingPeriod);
+ }
+ catch (IllegalStateException e)
+ {
+ log.debug("Unable to schedule TimerTask on existing Timer", e);
+ timer =3D new Timer(true);
+ timer.schedule(timerTask, pingPeriod, pingPeriod);
+ }
}
=
public void stopPing()
--===============1840019920311106447==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 03:22:16 2009
Content-Type: multipart/mixed; boundary="===============7367827585201131453=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4974 -
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
Date: Sun, 12 Apr 2009 03:22:16 -0400
Message-ID:
--===============7367827585201131453==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 03:22:16 -0400 (Sun, 12 Apr 2009)
New Revision: 4974
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/Sock=
etServerInvoker.java
Log:
JBREM-1076: If loop in processInvocation() ends with running =3D=3D false, =
returns immediately.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/sock=
et/SocketServerInvoker.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/Soc=
ketServerInvoker.java 2009-04-12 05:37:01 UTC (rev 4973)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/Soc=
ketServerInvoker.java 2009-04-12 07:22:16 UTC (rev 4974)
@@ -753,6 +753,10 @@
}
}
=
+ if (!running)
+ {
+ return;
+ }
clientpool.insert(worker, worker);
}
=
--===============7367827585201131453==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 03:24:19 2009
Content-Type: multipart/mixed; boundary="===============4490163330480151827=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4975 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/shutdown.
Date: Sun, 12 Apr 2009 03:24:18 -0400
Message-ID:
--===============4490163330480151827==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 03:24:18 -0400 (Sun, 12 Apr 2009)
New Revision: 4975
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socke=
t/shutdown/ProcessInvocationShutdownTestCase.java
Log:
JBREM-1076: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/s=
ocket/shutdown/ProcessInvocationShutdownTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/sock=
et/shutdown/ProcessInvocationShutdownTestCase.java =
(rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/sock=
et/shutdown/ProcessInvocationShutdownTestCase.java 2009-04-12 07:24:18 UTC =
(rev 4975)
@@ -0,0 +1,241 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.shutdown;
+
+import java.io.IOException;
+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.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.InvokerRegistry;
+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.ServerFactory;
+import org.jboss.remoting.transport.socket.LRUPool;
+import org.jboss.remoting.transport.socket.SocketServerInvoker;
+import org.jboss.remoting.transport.socket.TransportClientFactory;
+
+
+/**
+ * Unit test for JBREM-1076.
+ * =
+ * @author Ron Sigal
+ * @version $Rev$
+ *
+ * Copyright Apr 12, 2009
+ *
+ */
+public class ProcessInvocationShutdownTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(ProcessInvocationShutdow=
nTestCase.class);
+ =
+ private static boolean firstTime =3D true;
+ =
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+ protected SocketServerInvoker socketServerInvoker;
+
+ =
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testShutdown() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ assertTrue(connector.getServerInvoker() instanceof TestServerInvoker=
);
+ log.info("using a TestServerInvoker");
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ final Client client =3D new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+ =
+ // Start SocketServerInvoker.processInvocation().
+ new Thread()
+ {
+ public void run()
+ {
+ try
+ {
+ client.invoke("abc");
+ }
+ catch (Throwable e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }.start();
+ =
+ Thread.sleep(4000);
+ shutdownServer();
+ Thread.sleep(4000);
+ assertFalse(TestLRUPool.called);
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ protected String getTransport()
+ {
+ return "test";
+ }
+ =
+ =
+ protected void addExtraClientConfig(Map config) {}
+ protected void addExtraServerConfig(Map config) {}
+ =
+
+ protected void setupServer() throws Exception
+ {
+ InvokerRegistry.registerInvokerFactories(getTransport(), TransportCl=
ientFactory.class, TestTransportServerFactory.class);
+ host =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ String metadata =3D System.getProperty("remoting.metadata");
+ if (metadata !=3D null)
+ {
+ locatorURI +=3D "/?" + metadata;
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ socketServerInvoker =3D (SocketServerInvoker) connector.getServerInv=
oker();
+ socketServerInvoker.setMaxPoolSize(0);
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+
+ static class TestLRUPool extends LRUPool
+ {
+ static public boolean called;
+ =
+ public TestLRUPool(int min, int max)
+ {
+ super(min, max);
+ } =
+ public void insert(Object key, Object o)
+ {
+ log.info(this + ".insert() called");
+ called =3D true;
+ }
+ }
+ =
+ static class TestServerInvoker extends SocketServerInvoker
+ {
+ public TestServerInvoker(InvokerLocator locator, Map configuration)
+ {
+ super(locator, configuration);
+ }
+ public TestServerInvoker(InvokerLocator locator)
+ {
+ super(locator);
+ }
+ public synchronized void start() throws IOException
+ {
+ super.start();
+ clientpool =3D new TestLRUPool(2, maxPoolSize);
+ clientpool.create(); =
+ }
+ }
+ =
+ static public class TestTransportServerFactory implements ServerFactory
+ {
+ public boolean called;
+ =
+ public ServerInvoker createServerInvoker(InvokerLocator locator, Map=
config)
+ {
+ called =3D true;
+ log.info(this + ".createServerInvoker() called");
+ return new TestServerInvoker(locator, config);
+ }
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
--===============4490163330480151827==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 21:39:56 2009
Content-Type: multipart/mixed; boundary="===============7669771384025851173=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4976 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Sun, 12 Apr 2009 21:39:51 -0400
Message-ID:
--===============7669771384025851173==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 21:39:51 -0400 (Sun, 12 Apr 2009)
New Revision: 4976
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1083: (1) Made invokerDestructionTimer and invokerDestructionTimerLoc=
k static; (2) made invoker reference in InvokerDesctructionTimerTask a Weak=
Reference.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java 2009-04-=
12 07:24:18 UTC (rev 4975)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java 2009-04-=
13 01:39:51 UTC (rev 4976)
@@ -51,6 +51,7 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.io.StreamCorruptedException;
+import java.lang.ref.WeakReference;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.rmi.MarshalException;
@@ -172,6 +173,9 @@
private static final Logger log =3D Logger.getLogger(Client.class);
=
private static final long serialVersionUID =3D 5679279425009837934L;
+ =
+ private static Timer invokerDestructionTimer;
+ private static Object invokerDestructionTimerLock =3D new Object();
=
// Static -------------------------------------------------------------=
--------------------------
=
@@ -205,8 +209,6 @@
private boolean connected =3D false;
=
private int invokerDestructionDelay =3D 0;
- private Timer invokerDestructionTimer;
- private Object invokerDestructionTimerLock =3D new Object();
=
// Constructors -------------------------------------------------------=
--------------------------
=
@@ -1843,17 +1845,20 @@
// Inner classes ------------------------------------------------------=
--------------------------
class InvokerDestructionTimerTask extends TimerTask
{
- private ClientInvoker invoker;
+ private WeakReference ref;
=
public InvokerDestructionTimerTask(ClientInvoker invoker)
{
- this.invoker =3D invoker;
+ ref =3D new WeakReference(invoker);
}
=
public void run()
{
- log.trace("calling InvokerRegistry.destroyClientInvoker() for " +=
invoker);
+ ClientInvoker invoker =3D (ClientInvoker) ref.get();
+ log.trace(this + " calling InvokerRegistry.destroyClientInvoker()=
for " + invoker);
InvokerRegistry.destroyClientInvoker(invoker.getLocator(), config=
uration);
+ ref.clear();
+ ref =3D null;
}
}
}
--===============7669771384025851173==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 21:49:39 2009
Content-Type: multipart/mixed; boundary="===============3954137892273649935=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4977 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker.
Date: Sun, 12 Apr 2009 21:49:39 -0400
Message-ID:
--===============3954137892273649935==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 21:49:38 -0400 (Sun, 12 Apr 2009)
New Revision: 4977
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/ClientI=
nvokerDelayedDestructionTestCase.java
Log:
JBREM-1083: Added testStaticTimer().
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/=
ClientInvokerDelayedDestructionTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/Client=
InvokerDelayedDestructionTestCase.java 2009-04-13 01:39:51 UTC (rev 4976)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/invoker/Client=
InvokerDelayedDestructionTestCase.java 2009-04-13 01:49:38 UTC (rev 4977)
@@ -21,9 +21,11 @@
*/
package org.jboss.test.remoting.invoker;
=
+import java.lang.reflect.Field;
import java.net.InetAddress;
import java.util.HashMap;
import java.util.Map;
+import java.util.Timer;
=
import javax.management.MBeanServer;
=
@@ -33,7 +35,6 @@
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;
@@ -76,7 +77,7 @@
if (firstTime)
{
firstTime =3D false;
- Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
PatternLayout layout =3D new PatternLayout(pattern);
@@ -262,6 +263,49 @@
}
=
=
+ public void testStaticTimer() throws Throwable
+ {
+ log.info("entering " + getName());
+ =
+ // Start server.
+ setupServer();
+ =
+ =
+ // Get static Timer.
+ Field field =3D Client.class.getDeclaredField("invokerDestructionTim=
er");
+ field.setAccessible(true);
+ Timer invokerDestructionTimer =3D (Timer) field.get(null);
+ =
+ // Create client.
+ InvokerLocator clientLocator =3D new InvokerLocator(locatorURI);
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ clientConfig.put(Client.INVOKER_DESTRUCTION_DELAY, "5000");
+ addExtraClientConfig(clientConfig);
+ Client[] clients =3D new Client[50];
+
+ for (int i =3D 0; i < 50; i++)
+ {
+ clients[i] =3D new Client(clientLocator, clientConfig);
+ clients[i].connect();
+ assertEquals("abc", clients[i].invoke("abc"));
+ clients[i].disconnect();
+ }
+ =
+ // Verify all Clients are using the same Timer.
+ for (int i =3D 0; i < 50; i++)
+ {
+ assertEquals("Should be the same Timer", invokerDestructionTimer,=
field.get(clients[i]));
+ }
+ =
+ Thread.sleep(10000);
+ assertEquals(0, InvokerRegistry.getClientInvokers().length);
+
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
protected String getTransport()
{
return "socket";
--===============3954137892273649935==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 23:47:59 2009
Content-Type: multipart/mixed; boundary="===============3759754770238199173=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4978 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype.
Date: Sun, 12 Apr 2009 23:47:59 -0400
Message-ID:
--===============3759754770238199173==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 23:47:59 -0400 (Sun, 12 Apr 2009)
New Revision: 4978
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataTy=
peRaceTestCase.java
Log:
JBREM-1109: Reduced number of threads to 1000 to avoid "java.lang.OutOfMemo=
ryError: unable to create new native thread".
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype=
/DataTypeRaceTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java 2009-04-13 01:49:38 UTC (rev 4977)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java 2009-04-13 03:47:59 UTC (rev 4978)
@@ -111,7 +111,7 @@
// Test datatype race.
MicroRemoteClientInvoker clientInvoker =3D (MicroRemoteClientInvoker=
) client.getInvoker();
=
- int THREADS =3D 2000;
+ int THREADS =3D 1000;
TestThread[] threads =3D new TestThread[THREADS];
Rendezvous startBarrier =3D new Rendezvous(THREADS);
Rendezvous stopBarrier =3D new Rendezvous(THREADS + 1);
--===============3759754770238199173==--
From jboss-remoting-commits at lists.jboss.org Sun Apr 12 23:50:22 2009
Content-Type: multipart/mixed; boundary="===============4469712482188387530=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4979 -
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype.
Date: Sun, 12 Apr 2009 23:50:22 -0400
Message-ID:
--===============4469712482188387530==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-12 23:50:21 -0400 (Sun, 12 Apr 2009)
New Revision: 4979
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataTy=
peRaceTestCase.java
Log:
JBREM-1109: Reduced number of threads to 1000 to avoid "java.lang.OutOfMemo=
ryError: unable to create new native thread".
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype=
/DataTypeRaceTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java 2009-04-13 03:47:59 UTC (rev 4978)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataT=
ypeRaceTestCase.java 2009-04-13 03:50:21 UTC (rev 4979)
@@ -111,7 +111,7 @@
// Test datatype race.
MicroRemoteClientInvoker clientInvoker =3D (MicroRemoteClientInvoker=
) client.getInvoker();
=
- int THREADS =3D 2000;
+ int THREADS =3D 1000;
TestThread[] threads =3D new TestThread[THREADS];
Rendezvous startBarrier =3D new Rendezvous(THREADS);
Rendezvous stopBarrier =3D new Rendezvous(THREADS + 1);
--===============4469712482188387530==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 02:23:57 2009
Content-Type: multipart/mixed; boundary="===============3997594461979462440=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4980 -
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet.
Date: Mon, 13 Apr 2009 02:23:57 -0400
Message-ID:
--===============3997594461979462440==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 02:23:56 -0400 (Mon, 13 Apr 2009)
New Revision: 4980
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/Ser=
vletServerInvoker.java
Log:
JBREM-1114: (1) Added "unwrapSingletonArray" parameter; (2) creates new Inv=
ocationRequest if request body is null.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/serv=
let/ServletServerInvoker.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/Se=
rvletServerInvoker.java 2009-04-13 03:50:21 UTC (rev 4979)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/Se=
rvletServerInvoker.java 2009-04-13 06:23:56 UTC (rev 4980)
@@ -48,10 +48,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
@@ -66,22 +62,47 @@
*/
public class ServletServerInvoker extends WebServerInvoker implements Serv=
letServerInvokerMBean
{
+ public static final String UNWRAP_SINGLETON_ARRAYS =3D "unwrapSingleton=
Arrays";
+ =
private static final Logger log =3D Logger.getLogger(ServletServerInvok=
er.class);
+ =
+ private boolean unwrapSingletonArrays;
=
public ServletServerInvoker(InvokerLocator locator)
{
super(locator);
+ init();
}
=
public ServletServerInvoker(InvokerLocator locator, Map configuration)
{
super(locator, configuration);
+ init();
}
=
protected String getDefaultDataType()
{
return HTTPMarshaller.DATATYPE;
}
+ =
+ protected void init()
+ {
+ Object val =3D configuration.get(UNWRAP_SINGLETON_ARRAYS);
+ if (val !=3D null)
+ {
+ try
+ {
+ unwrapSingletonArrays =3D Boolean.valueOf((String)val).boolean=
Value();
+ log.debug(this + " setting unwrapSingletonArrays to " + unwrap=
SingletonArrays);
+ }
+ catch (Exception e)
+ {
+ log.warn(this + " could not convert " + =
+ UNWRAP_SINGLETON_ARRAYS + " value of " +
+ val + " to a boolean value.");
+ }
+ }
+ }
=
public void processRequest(HttpServletRequest request, HttpServletRespo=
nse response) throws ServletException, IOException
{
@@ -97,8 +118,37 @@
}
=
Map urlParams =3D request.getParameterMap();
- metadata.putAll(urlParams);
+ if (unwrapSingletonArrays)
+ {
+ Iterator it =3D urlParams.keySet().iterator();
+ while (it.hasNext())
+ {
+ Object key =3D it.next();
+ Object value =3D urlParams.get(key);
+ String[] valueArray =3D (String[]) value;
+ if (valueArray.length =3D=3D 1)
+ {
+ value =3D valueArray[0];
+ }
+ metadata.put(key, value);
+ }
+ }
+ else
+ {
+ metadata.putAll(urlParams);
+ }
=
+ if(log.isTraceEnabled())
+ {
+ log.trace("metadata:");
+ Iterator it =3D metadata.keySet().iterator();
+ while (it.hasNext())
+ {
+ Object key =3D it.next();
+ log.trace(" " + key + ": " + metadata.get(key));
+ }
+ }
+ =
// UnMarshaller may not be an HTTPUnMarshaller, in which case it
// can ignore this parameter.
Object o =3D configuration.get(HTTPUnMarshaller.PRESERVE_LINES);
@@ -222,7 +272,25 @@
}
=
Map urlParams =3D request.getParameterMap();
- metadata.putAll(urlParams);
+ if (unwrapSingletonArrays)
+ {
+ Iterator it =3D urlParams.keySet().iterator();
+ while (it.hasNext())
+ {
+ Object key =3D it.next();
+ Object value =3D urlParams.get(key);
+ String[] valueArray =3D (String[]) value;
+ if (valueArray.length =3D=3D 1)
+ {
+ value =3D valueArray[0];
+ }
+ metadata.put(key, value);
+ }
+ }
+ else
+ {
+ metadata.putAll(urlParams);
+ }
=
metadata.put(HTTPMetadataConstants.METHODTYPE, request.getMethod());
=
@@ -250,43 +318,50 @@
=
try
{
+ InvocationRequest invocationRequest =3D null;
Object responseObject =3D null;
-
- ServletInputStream inputStream =3D request.getInputStream();
- UnMarshaller unmarshaller =3D getUnMarshaller();
- Object obj =3D null;
- if (unmarshaller instanceof VersionedUnMarshaller)
- obj =3D ((VersionedUnMarshaller)unmarshaller).read(new ByteArr=
ayInputStream(requestByte), metadata, getVersion());
- else
- obj =3D unmarshaller.read(new ByteArrayInputStream(requestByte=
), metadata);
- inputStream.close();
-
boolean isError =3D false;
- InvocationRequest invocationRequest =3D null;
=
- if(obj instanceof InvocationRequest)
+ String method =3D request.getMethod();
+ if (method.equals("GET") || method.equals("HEAD") || (method.equa=
ls("OPTIONS") && request.getContentLength() <=3D 0))
{
- invocationRequest =3D (InvocationRequest) obj;
- =
- Map requestMap =3D invocationRequest.getRequestPayload();
- if (requestMap =3D=3D null)
- {
- invocationRequest.setRequestPayload(metadata);
- }
- else
- {
- requestMap.putAll(metadata);
- }
+ invocationRequest =3D createNewInvocationRequest(metadata, nul=
l);
}
else
{
- if(WebUtil.isBinary(requestContentType))
+ ServletInputStream inputStream =3D request.getInputStream();
+ UnMarshaller unmarshaller =3D getUnMarshaller();
+ Object obj =3D null;
+ if (unmarshaller instanceof VersionedUnMarshaller)
+ obj =3D ((VersionedUnMarshaller)unmarshaller).read(new Byte=
ArrayInputStream(requestByte), metadata, getVersion());
+ else
+ obj =3D unmarshaller.read(new ByteArrayInputStream(requestB=
yte), metadata);
+ inputStream.close();
+
+ if(obj instanceof InvocationRequest)
{
- invocationRequest =3D getInvocationRequest(metadata, obj);
+ invocationRequest =3D (InvocationRequest) obj;
+
+ Map requestMap =3D invocationRequest.getRequestPayload();
+ if (requestMap =3D=3D null)
+ {
+ invocationRequest.setRequestPayload(metadata);
+ }
+ else
+ {
+ requestMap.putAll(metadata);
+ }
}
else
{
- invocationRequest =3D createNewInvocationRequest(metadata, =
obj);
+ if(WebUtil.isBinary(requestContentType))
+ {
+ invocationRequest =3D getInvocationRequest(metadata, obj=
);
+ }
+ else
+ {
+ invocationRequest =3D createNewInvocationRequest(metadat=
a, obj);
+ }
}
}
=
--===============3997594461979462440==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 02:24:32 2009
Content-Type: multipart/mixed; boundary="===============5122290177706366925=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4981 -
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web.
Date: Mon, 13 Apr 2009 02:24:32 -0400
Message-ID:
--===============5122290177706366925==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 02:24:32 -0400 (Mon, 13 Apr 2009)
New Revision: 4981
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/web=
/ServerInvokerServlet.java
Log:
JBREM-1114: Added some logging.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/serv=
let/web/ServerInvokerServlet.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/we=
b/ServerInvokerServlet.java 2009-04-13 06:23:56 UTC (rev 4980)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/servlet/we=
b/ServerInvokerServlet.java 2009-04-13 06:24:32 UTC (rev 4981)
@@ -75,7 +75,15 @@
{
throw new ServletException("Could not find init parameter for =
'locatorUrl' or 'locatorName' - one of which must be supplied for ServerInv=
okerServlet to function.");
}
+ else
+ {
+ log.debug("Got ServletServerInvoker from InvokerName: " + conf=
ig.getInitParameter("invokerName"));
+ }
}
+ else
+ {
+ log.debug("Got ServletServerInvoker from InvokerLocator: " + conf=
ig.getInitParameter("locatorUrl"));
+ }
}
=
/**
--===============5122290177706366925==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 02:49:47 2009
Content-Type: multipart/mixed; boundary="===============4574751920893515459=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4982 -
remoting2/branches/2.x/docs/guide/en.
Date: Mon, 13 Apr 2009 02:49:46 -0400
Message-ID:
--===============4574751920893515459==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 02:49:46 -0400 (Mon, 13 Apr 2009)
New Revision: 4982
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-1114: Added description of "unwrapSingletonArray" parameter.
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-04-13 06:24:32 UTC =
(rev 4981)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-04-13 06:49:46 UTC =
(rev 4982)
@@ -2065,6 +2065,14 @@
ServerInvokerServlet will still use "jboss" a=
s the
default domain.
=
+
+ Configuration
+ =
+ unwrapSingletonArrays - I=
f the map
+ returned by javax.servlet.http.HttpServletRequest.getP=
arameterMap()
+ maps a String key to an array of length one, the value in the arra=
y will be extracted
+ and associated with the key.
+
=
@@ -6444,6 +6452,16 @@
=
+ org.jboss.remoting.transport.servlet.ServletServerInvoker
+
+ UNWRAP_SINGLETON_ARRAYS (actu=
al value
+ is 'unwrapSingletonArrays') - If the map returned by
+ javax.servlet.http.HttpServletRequest.getParameterMap()
+ maps a String key to an array of length one, the value in the array wi=
ll be
+ extracted and associated with the key.
+ =
+ =
+ org.jboss.remoting.transport.socket.MicroSocketClientInvoker
=
TCP_NODELAY_FLAG (actual valu=
e is
--===============4574751920893515459==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 06:29:48 2009
Content-Type: multipart/mixed; boundary="===============1554388745830044270=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4983 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Mon, 13 Apr 2009 06:29:48 -0400
Message-ID:
--===============1554388745830044270==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 06:29:47 -0400 (Mon, 13 Apr 2009)
New Revision: 4983
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionNotifier.ja=
va
Log:
JBREM-1113: Use copies of lists to avoid ConcurrentModificationException.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionNoti=
fier.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionNotifier.j=
ava 2009-04-13 06:49:46 UTC (rev 4982)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ConnectionNotifier.j=
ava 2009-04-13 10:29:47 UTC (rev 4983)
@@ -47,14 +47,17 @@
Client client =3D new Client(new InvokerLocator(locatorurl), requ=
estPayload);
client.setSessionId(clientSessionId);
=
+ ArrayList localListeners =3D null;
synchronized (listeners)
{
- Iterator it =3D listeners.iterator();
- while (it.hasNext())
- {
- ((ConnectionListener) it.next()).handleConnectionException(=
null, client);
- }
+ localListeners =3D new ArrayList(listeners);
}
+ =
+ Iterator it =3D localListeners.iterator();
+ while (it.hasNext())
+ {
+ ((ConnectionListener) it.next()).handleConnectionException(nul=
l, client);
+ }
}
catch(Exception e)
{
@@ -74,14 +77,17 @@
client.setSessionId(clientSessionId);
ClientDisconnectedException ex =3D new ClientDisconnectedExceptio=
n();
=
+ ArrayList localListeners =3D null;
synchronized (listeners)
{
- Iterator it =3D listeners.iterator();
- while (it.hasNext())
- {
- ((ConnectionListener) it.next()).handleConnectionException(=
ex, client);
- }
+ localListeners =3D new ArrayList(listeners);
}
+ =
+ Iterator it =3D localListeners.iterator();
+ while (it.hasNext())
+ {
+ ((ConnectionListener) it.next()).handleConnectionException(ex,=
client);
+ }
}
catch(Exception e)
{
--===============1554388745830044270==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 06:31:35 2009
Content-Type: multipart/mixed; boundary="===============8714193765507815904=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4984 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Mon, 13 Apr 2009 06:31:34 -0400
Message-ID:
--===============8714193765507815904==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 06:31:34 -0400 (Mon, 13 Apr 2009)
New Revision: 4984
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/ServerInvoker.java
Log:
JBREM-1113: (1) Made removeCallbackHandler() public; (2) added shutdownCall=
backHandler().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/ServerInvoker.=
java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/ServerInvoker.java 2=
009-04-13 10:29:47 UTC (rev 4983)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/ServerInvoker.java 2=
009-04-13 10:31:34 UTC (rev 4984)
@@ -867,28 +867,7 @@
//then it will just use that without having to do a lookup or =
HashMap iteration over
//values
=
- ServerInvocationHandler handler =3D null;
- =
- if (singleHandler !=3D null)
- {
- handler =3D singleHandler;
- }
- else
- { =
- if (subsystem !=3D null)
- {
- handler =3D (ServerInvocationHandler)handlers.get(subsys=
tem.toUpperCase());
- }
- else
- {
- // subsystem not specified, so will hope for a default o=
ne being set
- if (!handlers.isEmpty())
- {
- if (trace) { log.trace(this + " handling invocation w=
ith no subsystem explicitely specified, using the default handler"); }
- handler =3D (ServerInvocationHandler)handlers.values(=
).iterator().next();
- }
- }
- }
+ ServerInvocationHandler handler =3D findInvocationHandler(subs=
ystem);
=
if (param instanceof InternalInvocation)
{
@@ -1664,6 +1643,10 @@
if (registerCallbackListeners)
{
connectionNotifier.addListenerFirst(callbackHandler);
+ if(leasePeriod > 0)
+ {
+ leaseManagement =3D true;
+ }
}
handler.addListener(callbackHandler);
}
@@ -1672,6 +1655,14 @@
ServerInvokerCallbackHandler callbackHandler =3D removeCallbackHa=
ndler(invocation);
if(callbackHandler !=3D null)
{
+ if (registerCallbackListeners)
+ {
+// connectionNotifier.removeListener(callbackHandler);
+ removeConnectionListener(callbackHandler);
+ }
+ =
+ callbackHandler.destroy();
+ =
if(handler =3D=3D null)
{
throw new InvalidConfigurationException(
@@ -1679,15 +1670,10 @@
"registered. Please add via xml configuration or via th=
e Connector's " +
"addInvocationHandler() method.");
}
- if (registerCallbackListeners)
- {
- connectionNotifier.removeListener(callbackHandler);
- }
+ =
handler.removeListener(callbackHandler);
=
if(trace) { log.trace("ServerInvoker (" + this + ") removing s=
erver callback handler " + callbackHandler + "."); }
-
- callbackHandler.destroy();
}
else
{
@@ -1815,7 +1801,34 @@
}
return result;
}
+ =
+ protected ServerInvocationHandler findInvocationHandler(String subsyste=
m)
+ {
+ ServerInvocationHandler handler =3D null;
=
+ if (singleHandler !=3D null)
+ {
+ handler =3D singleHandler;
+ }
+ else
+ { =
+ if (subsystem !=3D null)
+ {
+ handler =3D (ServerInvocationHandler)handlers.get(subsystem.to=
UpperCase());
+ }
+ else
+ {
+ // subsystem not specified, so will hope for a default one bei=
ng set
+ if (!handlers.isEmpty())
+ {
+ if (trace) { log.trace(this + " handling invocation with no=
subsystem explicitely specified, using the default handler"); }
+ handler =3D (ServerInvocationHandler)handlers.values().iter=
ator().next();
+ }
+ }
+ }
+ return handler;
+ }
+ =
/**
* Called prior to an invocation.
* TODO is sending in the arg appropriate?
@@ -2049,7 +2062,7 @@
return callbackHandler;
}
=
- private ServerInvokerCallbackHandler removeCallbackHandler(InvocationRe=
quest invocation)
+ public ServerInvokerCallbackHandler removeCallbackHandler(InvocationReq=
uest invocation)
{
String id =3D ServerInvokerCallbackHandler.getId(invocation);
ServerInvokerCallbackHandler callbackHandler =3D null;
@@ -2060,6 +2073,25 @@
}
return callbackHandler;
}
+ =
+ public void shutdownCallbackHandler(ServerInvokerCallbackHandler callba=
ckHandler, InvocationRequest invocation)
+ {
+ removeCallbackHandler(invocation);
+ if (registerCallbackListeners)
+ {
+ removeConnectionListener(callbackHandler);
+ }
+ ServerInvocationHandler handler =3D findInvocationHandler(invocation=
.getSessionId());
+ if (handler !=3D null)
+ {
+ handler.removeListener(callbackHandler);
+ if(trace) { log.trace(this + " removing server callback handler "=
+ callbackHandler + "."); }
+ }
+ else
+ {
+ log.debug(this + " cannot remove " + callbackHandler + ": associa=
ted ServerInvocationHandler not longer exists");
+ }
+ }
=
// Inner classes ------------------------------------------------------=
--------------------------
=
--===============8714193765507815904==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 06:32:33 2009
Content-Type: multipart/mixed; boundary="===============8869241488028637610=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4985 -
remoting2/branches/2.x/src/main/org/jboss/remoting/callback.
Date: Mon, 13 Apr 2009 06:32:32 -0400
Message-ID:
--===============8869241488028637610==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 06:32:31 -0400 (Mon, 13 Apr 2009)
New Revision: 4985
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/callback/ServerInvoke=
rCallbackHandler.java
Log:
JBREM-1113: Added shutdown() method.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/callback/Serve=
rInvokerCallbackHandler.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/callback/ServerInvok=
erCallbackHandler.java 2009-04-13 10:31:34 UTC (rev 4984)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/callback/ServerInvok=
erCallbackHandler.java 2009-04-13 10:32:31 UTC (rev 4985)
@@ -85,6 +85,7 @@
=
private SerializableStore callbackStore =3D null;
private CallbackErrorHandler callbackErrorHandler =3D null;
+ private ServerInvoker serverInvoker;
=
/**
* The map key to use when looking up any callback store that
@@ -170,6 +171,7 @@
=
private void init(InvocationRequest invocation, ServerInvoker owner) th=
rows Exception
{
+ serverInvoker =3D owner;
clientSessionId =3D invocation.getSessionId();
sessionId =3D invocation.getSessionId();
=
@@ -1025,12 +1027,18 @@
}
}
=
+ public void shutdown()
+ {
+ serverInvoker.shutdownCallbackHandler(this, invocation);
+ destroy();
+ log.debug(this + " shut down");
+ }
+ =
public void handleConnectionException(Throwable throwable, Client clien=
t)
{
if (clientSessionId.equals(client.getSessionId()))
{
- destroy();
- log.debug(this + " shut down");
+ shutdown();
}
}
=
--===============8869241488028637610==--
From jboss-remoting-commits at lists.jboss.org Mon Apr 13 06:33:48 2009
Content-Type: multipart/mixed; boundary="===============6203905399594608048=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4986 - in
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback: leak and 1
other directory.
Date: Mon, 13 Apr 2009 06:33:47 -0400
Message-ID:
--===============6203905399594608048==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-13 06:33:46 -0400 (Mon, 13 Apr 2009)
New Revision: 4986
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/leak/
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/leak/S=
erverInvokerCallbackHandlerLeakTestCase.java
Log:
JBREM-1113: New unit tests.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/le=
ak/ServerInvokerCallbackHandlerLeakTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/leak/=
ServerInvokerCallbackHandlerLeakTestCase.java (rev =
0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/leak/=
ServerInvokerCallbackHandlerLeakTestCase.java 2009-04-13 10:33:46 UTC (rev =
4986)
@@ -0,0 +1,279 @@
+/*
+ * 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.callback.leak;
+
+import java.lang.reflect.Field;
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TimerTask;
+
+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.remoting.Client;
+import org.jboss.remoting.ConnectionListener;
+import org.jboss.remoting.ConnectionNotifier;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.LeasePinger;
+import org.jboss.remoting.MicroRemoteClientInvoker;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.Callback;
+import org.jboss.remoting.callback.HandleCallbackException;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+
+
+/**
+ * Unit tests for JBREM-1113.
+ * =
+ * @author Ron Sigal
+ * @version $Rev$
+ *
+ * Copyright Apr 13, 2009
+ *
+ */
+public class ServerInvokerCallbackHandlerLeakTestCase extends TestCase
+{
+ private static Logger log =3D Logger.getLogger(ServerInvokerCallbackHan=
dlerLeakTestCase.class);
+ =
+ private static boolean firstTime =3D true;
+ private static int COUNT =3D 10;
+ private static Object lock =3D new Object();
+ =
+ 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 =3D false;
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern =3D "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout =3D new PatternLayout(pattern);
+ ConsoleAppender consoleAppender =3D new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender); =
+ }
+ TestConnectionListener.count =3D 0;
+ }
+
+ =
+ public void tearDown()
+ {
+ }
+ =
+ =
+ public void testLeakWithCallbackHandlersListening() throws Throwable
+ {
+ doLeakTest(true);
+ }
+ =
+ =
+ public void testLeakWithoutCallbackHandlersListening() throws Throwable
+ {
+ doLeakTest(false);
+ }
+ =
+ =
+ public void doLeakTest(boolean registerCallbackListener) throws Throwab=
le
+ {
+ log.info("entering " + getName());
+ setupServer(registerCallbackListener);
+ =
+ // Get fields.
+ ServerInvoker serverInvoker =3D connector.getServerInvoker();
+ Field field =3D ServerInvoker.class.getDeclaredField("connectionNoti=
fier");
+ field.setAccessible(true);
+ ConnectionNotifier connectionNotifier =3D (ConnectionNotifier) field=
.get(serverInvoker);
+ field =3D ServerInvoker.class.getDeclaredField("callbackHandlers");
+ field.setAccessible(true);
+ Map callbackHandlers =3D (Map) field.get(serverInvoker);
+ =
+ // Create client.
+ HashMap clientConfig =3D new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client =3D null;
+ =
+ for (int i =3D 0; i < COUNT; i++)
+ {
+ client =3D new Client(serverLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test connections.
+ assertEquals("abc", client.invoke("abc"));
+ log.info("connection is good");
+
+ TestCallbackHandler callbackHandler =3D new TestCallbackHandler();
+ client.addListener(callbackHandler, null, null, true);
+ }
+ =
+ field =3D MicroRemoteClientInvoker.class.getDeclaredField("leasePing=
er");
+ field.setAccessible(true);
+ LeasePinger pinger =3D (LeasePinger) field.get(client.getInvoker());
+ field =3D LeasePinger.class.getDeclaredField("timerTask");
+ field.setAccessible(true);
+ TimerTask timerTask =3D (TimerTask) field.get(pinger);
+ timerTask.cancel();
+ =
+ synchronized(lock)
+ {
+ lock.wait();
+ }
+ Thread.sleep(2000);
+ =
+ assertEquals(COUNT, TestConnectionListener.count);
+ assertEquals(1, connectionNotifier.size());
+ assertTrue(callbackHandlers.isEmpty());
+ =
+ log.info(getName() + " PASSES");
+ }
+ =
+ =
+ protected String getTransport()
+ {
+ return "socket";
+ }
+ =
+ =
+ protected void addExtraClientConfig(Map config) {}
+ protected void addExtraServerConfig(Map config) {}
+ =
+
+ protected void setupServer(boolean registerCallbackListener) throws Exc=
eption
+ {
+ host =3D InetAddress.getLocalHost().getHostAddress();
+ port =3D PortUtil.findFreePort(host);
+ locatorURI =3D getTransport() + "://" + host + ":" + port;
+ locatorURI +=3D "/?leasing=3Dtrue";
+ if (registerCallbackListener)
+ {
+ locatorURI +=3D "&" + ServerInvoker.REGISTER_CALLBACK_LISTENER + =
"=3Dtrue";
+ }
+ else
+ {
+ locatorURI +=3D "&" + ServerInvoker.REGISTER_CALLBACK_LISTENER + =
"=3Dfalse";
+ }
+ serverLocator =3D new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorU=
RI);
+ HashMap config =3D new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector =3D new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler =3D new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ connector.setLeasePeriod(2000);
+ TestConnectionListener listener =3D new TestConnectionListener(!regi=
sterCallbackListener);
+ connector.addConnectionListener(listener);
+ }
+ =
+ =
+ protected void shutdownServer() throws Exception
+ {
+ if (connector !=3D null)
+ connector.stop();
+ }
+ =
+ =
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ static public Set callbackHandlers =3D new HashSet();
+ public void addListener(InvokerCallbackHandler callbackHandler)
+ {
+ callbackHandlers.add(callbackHandler);
+ }
+ public Object invoke(final InvocationRequest invocation) throws Thro=
wable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+ =
+ =
+ static class TestCallbackHandler implements InvokerCallbackHandler
+ {
+ public void handleCallback(Callback callback) throws HandleCallbackE=
xception
+ {
+ log.info("received callback");
+ } =
+ }
+ =
+ =
+ static class TestConnectionListener implements ConnectionListener
+ {
+ static public int count;
+ boolean shutdownCallbackHandlers;
+ =
+ public TestConnectionListener(boolean shutdownCallbackHandlers)
+ {
+ this.shutdownCallbackHandlers =3D shutdownCallbackHandlers;
+ }
+
+ public synchronized void handleConnectionException(Throwable throwab=
le, Client client)
+ {
+ log.info("got connection exception");
+ if(++count =3D=3D COUNT)
+ {
+ if (shutdownCallbackHandlers)
+ {
+ Iterator it =3D TestInvocationHandler.callbackHandlers.iter=
ator();
+ while (it.hasNext())
+ {
+ ServerInvokerCallbackHandler callbackHandler =3D (Server=
InvokerCallbackHandler) it.next();
+ callbackHandler.shutdown();
+ log.info("shut down: " + callbackHandler);
+ }
+ TestInvocationHandler.callbackHandlers.clear();
+ }
+ synchronized(lock)
+ {
+ lock.notify();
+ }
+ }
+ } =
+ }
+}
\ No newline at end of file
--===============6203905399594608048==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 01:01:04 2009
Content-Type: multipart/mixed; boundary="===============4083455518106773190=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4987 - in
remoting2/branches/2.x/lib: jbossweb and 1 other directories.
Date: Tue, 14 Apr 2009 01:01:03 -0400
Message-ID:
--===============4083455518106773190==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 01:01:03 -0400 (Tue, 14 Apr 2009)
New Revision: 4987
Added:
remoting2/branches/2.x/lib/trove/lib/README
Modified:
remoting2/branches/2.x/lib/jboss/README
remoting2/branches/2.x/lib/jboss/jboss-common-core.jar
remoting2/branches/2.x/lib/jboss/jboss-j2se.jar
remoting2/branches/2.x/lib/jboss/jboss-jmx.jar
remoting2/branches/2.x/lib/jboss/jboss-logging-log4j.jar
remoting2/branches/2.x/lib/jboss/jnpserver.jar
remoting2/branches/2.x/lib/jbossweb/README
remoting2/branches/2.x/lib/jbossweb/jbossweb.jar
Log:
JBREM-1115: Updating jars to match AS 5.1.0.CR1.
Modified: remoting2/branches/2.x/lib/jboss/README
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/lib/jboss/README 2009-04-13 10:33:46 UTC (rev 49=
86)
+++ remoting2/branches/2.x/lib/jboss/README 2009-04-14 05:01:03 UTC (rev 49=
87)
@@ -1,15 +1,15 @@
The jars included in this directory are from the JBossAS sub-projects and =
are needed by JBossRemoting.
-The files currently listed are from a build of jboss-as-parent from 11/19/=
08, shortly before the release of AS 5.0.0.GA.
+The files currently listed match the versions on https://svn.jboss.org/rep=
os/jbossas/branches/Branch_5_x on 4/13/09.
=
File Version From =
------- ------- ----
-jboss-common-core.jar 2.2.10.GA http://repository.jboss.com/ma=
ven2/org/jboss/jboss-common-core/2.2.10.GA/
-jboss-j2se.jar 5.0.0.GA built from jboss-as-parent 11/=
19/08
-jboss-jmx.jar 5.0.0.GA built from jboss-as-parent 11/=
19/08
-jboss-logging-log4j.jar 2.0.5.GA http://repository.jboss.com/ma=
ven2/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/
+jboss-common-core.jar 2.2.12.GA http://repository.jboss.com/ma=
ven2/org/jboss/jboss-common-core/2.2.12.GA/
+jboss-j2se.jar 5.1.0.CR1 build: SVNTag=3DJBoss_5_1_0_CR=
1 date=3D200904131335
+jboss-jmx.jar 5.1.0.CR1 build: SVNTag=3DJBoss_5_1_0_CR=
1 date=3D200904131335
+jboss-logging-log4j.jar 2.0.6.GA http://repository.jboss.com/ma=
ven2/org/jboss/logging/jboss-logging-log4j/2.0.6.GA/
jboss-logging-spi.jar 2.0.5.GA http://repository.jboss.com/ma=
ven2/org/jboss/logging/jboss-logging-spi/2.0.5.GA/
jboss-serialization.jar 1.0.3.GA http://repository.jboss.com/ma=
ven2/jboss/jboss-serialization/1.0.3.GA/
-jnpserver.jar 5.0.0.GA http://repository.jboss.com/ma=
ven2/org/jboss/naming/jnpserver/5.0.0.GA/
+jnpserver.jar 5.0.1.GA http://repository.jboss.com/ma=
ven2/org/jboss/naming/jnpserver/5.0.1.GA/
=
=
=
Modified: remoting2/branches/2.x/lib/jboss/jboss-common-core.jar
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Modified: remoting2/branches/2.x/lib/jboss/jboss-j2se.jar
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Modified: remoting2/branches/2.x/lib/jboss/jboss-jmx.jar
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Modified: remoting2/branches/2.x/lib/jboss/jboss-logging-log4j.jar
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Modified: remoting2/branches/2.x/lib/jboss/jnpserver.jar
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Modified: remoting2/branches/2.x/lib/jbossweb/README
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/lib/jbossweb/README 2009-04-13 10:33:46 UTC (rev=
4986)
+++ remoting2/branches/2.x/lib/jbossweb/README 2009-04-14 05:01:03 UTC (rev=
4987)
@@ -1,3 +1,3 @@
File Version From =
------- ------- ----
-jbossweb.jar 2.1.1.GA http://repository.jboss.com/ma=
ven2/jboss/web/jbossweb/2.1.1.GA/
+jbossweb.jar 2.1.2.GA http://repository.jboss.com/ma=
ven2/jboss/web/jbossweb/2.1.2.GA/
Modified: remoting2/branches/2.x/lib/jbossweb/jbossweb.jar
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(Binary files differ)
Added: remoting2/branches/2.x/lib/trove/lib/README
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/lib/trove/lib/README (re=
v 0)
+++ remoting2/branches/2.x/lib/trove/lib/README 2009-04-14 05:01:03 UTC (re=
v 4987)
@@ -0,0 +1 @@
+Implementation-Version: 1.0.2
--===============4083455518106773190==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 01:58:19 2009
Content-Type: multipart/mixed; boundary="===============8456070375232763604=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4988 -
remoting2/branches/2.2/src/main/org/jboss/remoting.
Date: Tue, 14 Apr 2009 01:58:19 -0400
Message-ID:
--===============8456070375232763604==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 01:58:18 -0400 (Tue, 14 Apr 2009)
New Revision: 4988
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1103: Updated javadoc for invokeOneway() methods.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Client.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Client.java 2009-04-=
14 05:01:03 UTC (rev 4987)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Client.java 2009-04-=
14 05:58:18 UTC (rev 4988)
@@ -566,17 +566,18 @@
* client will not wait for a return.
*
* This is done one of two ways. The first is to pass true as the clien=
tSide param. This will
- * cause the execution of the remote call to be excuted in a new thread=
on the client side and
+ * cause the execution of the remote call to be executed in a new threa=
d on the client side and
* will return the calling thread before making call to server side. A=
lthough, this is optimal
* for performance, will not know about any problems contacting server.
*
* The second, is to pass false as the clientSide param. This will allo=
w the current calling
* thread to make the call to the remote server, at which point, the se=
rver side processing of
* the thread will be executed on the remote server in a new executing =
thread and the client
- * thread will return. This is a little slower, but will know that the=
call made it to the
- * server.
- *
- * NOTE: false case is not accurate.
+ * thread will return.
+ *
+ * NOTE: The treatment of server side oneway invocations may vary with=
the transport. The
+ * client side transport is not required to wait for a reply from the s=
erver. In particular,
+ * the socket and bisocket transports return immediately after writing =
the invocation.
*/
public void invokeOneway(final Object param, final Map sendPayload, boo=
lean clientSide)
throws Throwable
@@ -780,8 +781,7 @@
=
/**
* Same as calling invokeOneway(Object param, Map sendPayload, boolean =
clientSide) with
- * clientSide param being false and a null sendPayload. Therefore, clie=
nt thread will not return
- * till it has made remote call.
+ * clientSide param being false and a null sendPayload.
*/
public void invokeOneway(Object param) throws Throwable
{
@@ -790,8 +790,7 @@
=
/**
* Same as calling invokeOneway(Object param, Map sendPayload, boolean =
clientSide) with
- * clientSide param being false. Therefore, client thread will not ret=
urn till it has made
- * remote call.
+ * clientSide param being false.
*/
public void invokeOneway(Object param, Map sendPayload) throws Throwable
{
--===============8456070375232763604==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 01:59:17 2009
Content-Type: multipart/mixed; boundary="===============0222659943532673498=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4989 -
remoting2/branches/2.x/src/main/org/jboss/remoting.
Date: Tue, 14 Apr 2009 01:59:17 -0400
Message-ID:
--===============0222659943532673498==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 01:59:17 -0400 (Tue, 14 Apr 2009)
New Revision: 4989
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java
Log:
JBREM-1103: Updated javadoc for invokeOneway() methods.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java 2009-04-=
14 05:58:18 UTC (rev 4988)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Client.java 2009-04-=
14 05:59:17 UTC (rev 4989)
@@ -632,7 +632,7 @@
* client will not wait for a return.
*
* This is done one of two ways. The first is to pass true as the clien=
tSide param. This will
- * cause the execution of the remote call to be excuted in a new thread=
on the client side and
+ * cause the execution of the remote call to be executed in a new threa=
d on the client side and
* will return the calling thread before making call to server side.
*
* The second, is to pass false as the clientSide param. This will allo=
w the current calling
@@ -640,7 +640,8 @@
* the thread will be executed on the remote server in a new executing =
thread.
*
* NOTE: The treatment of server side oneway invocations may vary with=
the transport. The
- * client side transport is not required to wait for a reply from the s=
erver.
+ * client side transport is not required to wait for a reply from the s=
erver. In particular,
+ * the socket and bisocket transports return immediately after writing =
the invocation.
*/
public void invokeOneway(final Object param, final Map sendPayload, boo=
lean clientSide) =
throws Throwable
@@ -844,8 +845,7 @@
=
/**
* Same as calling invokeOneway(Object param, Map sendPayload, boolean =
clientSide) with
- * clientSide param being false and a null sendPayload. Therefore, clie=
nt thread will not return
- * till it has made remote call.
+ * clientSide param being false and a null sendPayload.
*/
public void invokeOneway(Object param) throws Throwable
{
@@ -854,8 +854,7 @@
=
/**
* Same as calling invokeOneway(Object param, Map sendPayload, boolean =
clientSide) with
- * clientSide param being false. Therefore, client thread will not ret=
urn till it has made
- * remote call.
+ * clientSide param being false.
*/
public void invokeOneway(Object param, Map sendPayload) throws Throwable
{
--===============0222659943532673498==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 02:28:35 2009
Content-Type: multipart/mixed; boundary="===============6440735150519243911=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r4990 -
remoting2/branches/2.x/docs/guide/en.
Date: Tue, 14 Apr 2009 02:28:35 -0400
Message-ID:
--===============6440735150519243911==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 02:28:34 -0400 (Tue, 14 Apr 2009)
New Revision: 4990
Modified:
remoting2/branches/2.x/docs/guide/en/chap11.xml
Log:
JBREM-1103: Updated oneway invocation example.
Modified: remoting2/branches/2.x/docs/guide/en/chap11.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/docs/guide/en/chap11.xml 2009-04-14 05:59:17 UTC=
(rev 4989)
+++ remoting2/branches/2.x/docs/guide/en/chap11.xml 2009-04-14 06:28:34 UTC=
(rev 4990)
@@ -290,6 +290,13 @@
server. This is faster of the two modes, but if there is a problem mak=
ing
the request on the server, the original caller will be unaware.
- */
-public class ServletSecurityUtility
-{
- static public byte[] processRequest(final ServletServerInvokerMBean inv=
oker,
- final HttpServletRequest request,
- final byte[] byteArray,
- final HttpServletResponse response)
- throws ServletException, IOException
- {
- if (SecurityUtility.skipAccessControl())
- {
- return invoker.processRequest(request, byteArray, response);
- }
-
- try
- {
- return (byte[]) AccessController.doPrivileged( new PrivilegedExce=
ptionAction()
- {
- public Object run() throws ServletException, IOException
- {
- return invoker.processRequest(request, byteArray, response);
- }
- });
- }
- catch (PrivilegedActionException e)
- {
- Throwable cause =3D e.getCause();
- if (cause instanceof ServletException)
- throw (ServletException) cause;
- else
- throw (IOException) e.getCause();
- } =
- }
-}
--===============5988341818334761533==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 06:30:40 2009
Content-Type: multipart/mixed; boundary="===============2639513088121790119=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5026 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi.
Date: Tue, 14 Apr 2009 06:30:40 -0400
Message-ID:
--===============2639513088121790119==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 06:30:40 -0400 (Tue, 14 Apr 2009)
New Revision: 5026
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
CleanDetectionTestClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
CleanDetectionTestServer.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
JNDIDetector2TestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
JNDIDetectorTest1.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
JNDIDetectorTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
RestartTestServer.java
Log:
JBREM-1116: Eliminated dependence on SecurityUtility.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/CleanDetectionTestClient.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/CleanDetectionTestClient.java 2009-04-14 10:27:24 UTC (rev 5025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/CleanDetectionTestClient.java 2009-04-14 10:30:40 UTC (rev 5026)
@@ -25,6 +25,9 @@
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.Properties;
=
import javax.naming.Binding;
@@ -98,7 +101,7 @@
=
// Get detection message from JNDI server.
createContext();
- NamingEnumeration enumeration =3D SecurityUtility.listBindings(co=
ntext, "");
+ NamingEnumeration enumeration =3D listBindings(context, "");
assertTrue(enumeration.hasMore());
Binding binding =3D (Binding) enumeration.next();
assertFalse(enumeration.hasMore());
@@ -117,7 +120,7 @@
Thread.sleep(4000);
=
// Get new detection message from JNDI server.
- enumeration =3D SecurityUtility.listBindings(context, "");
+ enumeration =3D listBindings(context, "");
assertTrue(enumeration.hasMore());
binding =3D (Binding) enumeration.next();
log.info(binding);
@@ -158,20 +161,91 @@
String subContextName =3D JNDIDetector.DETECTION_SUBCONTEXT_NAME;
try
{
- context =3D SecurityUtility.initialContextLookup(initialContext, =
subContextName);
+ context =3D initialContextLookup(initialContext, subContextName);
}
catch(NamingException e)
{
try
{
- context =3D SecurityUtility.createSubcontext(initialContext, s=
ubContextName);
+ context =3D createSubcontext(initialContext, subContextName);
}
catch(NameAlreadyBoundException e1)
{
log.debug("The sub context " + subContextName + " was created =
before we could.");
- context =3D SecurityUtility.initialContextLookup(initialContex=
t, subContextName);
+ context =3D initialContextLookup(initialContext, subContextNam=
e);
}
}
}
+ =
+ static private Context createSubcontext(final InitialContext initialCon=
text, final String subContextName)
+ throws NamingException
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ return initialContext.createSubcontext(subContextName);
+ }
=
+ try
+ {
+ return (Context) AccessController.doPrivileged( new PrivilegedExc=
eptionAction() =
+ {
+ public Object run() throws NamingException
+ {
+ return initialContext.createSubcontext(subContextName);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (NamingException) e.getCause();
+ }
+ }
+ =
+ static private Context initialContextLookup(final InitialContext initia=
lContext, final String subContextName)
+ throws NamingException
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ return (Context) initialContext.lookup(subContextName);
+ }
+
+ try
+ {
+ return (Context) AccessController.doPrivileged( new PrivilegedExc=
eptionAction() =
+ {
+ public Object run() throws NamingException
+ {
+ return initialContext.lookup(subContextName);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (NamingException) e.getCause();
+ }
+ }
+ =
+ static private NamingEnumeration listBindings(final Context context, fi=
nal String bindName)
+ throws NamingException
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ return context.listBindings(bindName);
+ }
+
+ try
+ {
+ return (NamingEnumeration) AccessController.doPrivileged( new Pri=
vilegedExceptionAction() =
+ {
+ public Object run() throws NamingException
+ {
+ return context.listBindings(bindName);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (NamingException) e.getCause();
+ }
+ }
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/CleanDetectionTestServer.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/CleanDetectionTestServer.java 2009-04-14 10:27:24 UTC (rev 5025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/CleanDetectionTestServer.java 2009-04-14 10:30:40 UTC (rev 5026)
@@ -43,10 +43,14 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
import java.util.Timer;
@@ -135,8 +139,8 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBeanI=
mpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", new=
Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial", =
"org.jnp.interfaces.NamingContextFactory");
- SecurityUtility.namingBeanImplStart(namingBean, startMethod);
+ setSystemProperty("java.naming.factory.initial", "org.jnp.interfa=
ces.NamingContextFactory");
+ namingBeanImplStart(namingBean, startMethod);
}
catch (Exception e)
{
@@ -331,4 +335,58 @@
// NO OP as we do not need a reference back to the server invoker
}
}
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
+ =
+ static private void namingBeanImplStart(final Object namingBean, final =
Method startMethod)
+ throws IllegalAccessException, InvocationTargetException
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ startMethod.invoke(namingBean, new Object[] {});
+ return;
+ }
+
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction() =
+ {
+ public Object run() throws IllegalAccessException, InvocationT=
argetException
+ {
+ startMethod.invoke(namingBean, new Object[] {});
+ return null;
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ Throwable cause =3D e.getCause();
+ if (cause instanceof IllegalAccessException)
+ throw (IllegalAccessException) cause;
+ else
+ throw (InvocationTargetException) cause;
+ }
+ }
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/JNDIDetector2TestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/JNDIDetector2TestCase.java 2009-04-14 10:27:24 UTC (rev 5025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/JNDIDetector2TestCase.java 2009-04-14 10:30:40 UTC (rev 5026)
@@ -8,6 +8,9 @@
=
import java.lang.reflect.Method;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
=
/**
* This should be used as the main test case for JNDI detector.
@@ -36,7 +39,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBe=
anImpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", =
new Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial=
", "org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.inte=
rfaces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -109,4 +112,28 @@
{
return 300000;
}
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/JNDIDetectorTest1.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/JNDIDetectorTest1.java 2009-04-14 10:27:24 UTC (rev 5025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/JNDIDetectorTest1.java 2009-04-14 10:30:40 UTC (rev 5026)
@@ -24,6 +24,10 @@
=
import java.lang.reflect.Method;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;
@@ -176,7 +180,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBe=
anImpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", =
new Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial=
", "org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.inte=
rfaces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -218,5 +222,28 @@
return new JNDIDetectorTest1.TestNetworkRegistry();
}
}
-
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
\ No newline at end of file
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/JNDIDetectorTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/JNDIDetectorTestCase.java 2009-04-14 10:27:24 UTC (rev 5025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/JNDIDetectorTestCase.java 2009-04-14 10:30:40 UTC (rev 5026)
@@ -24,6 +24,10 @@
=
import java.lang.reflect.Method;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
import org.apache.log4j.Level;
import org.jboss.jrunit.harness.TestDriver;
import org.jboss.remoting.samples.detection.jndi.SimpleJNDIServer;
@@ -58,7 +62,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBe=
anImpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", =
new Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial=
", "org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.inte=
rfaces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -130,4 +134,28 @@
{
return 300000;
}
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
\ No newline at end of file
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/RestartTestServer.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/RestartTestServer.java 2009-04-14 10:27:24 UTC (rev 5025)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/RestartTestServer.java 2009-04-14 10:30:40 UTC (rev 5026)
@@ -44,6 +44,9 @@
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
=
@@ -132,7 +135,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBeanI=
mpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", new=
Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial", =
"org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.interfa=
ces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -313,4 +316,28 @@
// NO OP as we do not need a reference back to the server invoker
}
}
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
--===============2639513088121790119==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 06:31:06 2009
Content-Type: multipart/mixed; boundary="===============5565820970601139378=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5027 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock.
Date: Tue, 14 Apr 2009 06:31:06 -0400
Message-ID:
--===============5565820970601139378==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 06:31:06 -0400 (Tue, 14 Apr 2009)
New Revision: 5027
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
deadlock/Server.java
Log:
JBREM-1116: Eliminated dependence on SecurityUtility.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/deadlock/Server.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/deadlock/Server.java 2009-04-14 10:30:40 UTC (rev 5026)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/deadlock/Server.java 2009-04-14 10:31:06 UTC (rev 5027)
@@ -45,6 +45,9 @@
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
=
@@ -228,7 +231,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBeanI=
mpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", new=
Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial", =
"org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.interfa=
ces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -347,6 +350,29 @@
}
=
}
-
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
=
--===============5565820970601139378==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 06:31:30 2009
Content-Type: multipart/mixed; boundary="===============0302613272355519979=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5028 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/deadlock3.
Date: Tue, 14 Apr 2009 06:31:30 -0400
Message-ID:
--===============0302613272355519979==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 06:31:30 -0400 (Tue, 14 Apr 2009)
New Revision: 5028
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
deadlock3/Server.java
Log:
JBREM-1116: Eliminated dependence on SecurityUtility.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/deadlock3/Server.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/deadlock3/Server.java 2009-04-14 10:31:06 UTC (rev 5027)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/deadlock3/Server.java 2009-04-14 10:31:30 UTC (rev 5028)
@@ -45,6 +45,9 @@
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
=
@@ -201,7 +204,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBeanI=
mpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", new=
Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial", =
"org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.interfa=
ces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -317,6 +320,29 @@
}
=
}
-
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
=
--===============0302613272355519979==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 06:31:57 2009
Content-Type: multipart/mixed; boundary="===============5500867180695777793=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5029 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/startup.
Date: Tue, 14 Apr 2009 06:31:54 -0400
Message-ID:
--===============5500867180695777793==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 06:31:53 -0400 (Tue, 14 Apr 2009)
New Revision: 5029
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/=
startup/JNDIDetectorServer.java
Log:
JBREM-1116: Eliminated dependence on SecurityUtility.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detectio=
n/jndi/startup/JNDIDetectorServer.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/startup/JNDIDetectorServer.java 2009-04-14 10:31:30 UTC (rev 5028)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi=
/startup/JNDIDetectorServer.java 2009-04-14 10:31:53 UTC (rev 5029)
@@ -38,6 +38,9 @@
=
import java.lang.reflect.Method;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
=
/**
* @author Tom Elrod
@@ -62,7 +65,7 @@
namingBeanImplClass =3D Class.forName("org.jnp.server.NamingBeanI=
mpl");
namingBean =3D namingBeanImplClass.newInstance();
Method startMethod =3D namingBeanImplClass.getMethod("start", new=
Class[] {});
- SecurityUtility.setSystemProperty("java.naming.factory.initial", =
"org.jnp.interfaces.NamingContextFactory");
+ setSystemProperty("java.naming.factory.initial", "org.jnp.interfa=
ces.NamingContextFactory");
startMethod.invoke(namingBean, new Object[] {});
}
catch (Exception e)
@@ -158,5 +161,28 @@
=
}
=
-
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
\ No newline at end of file
--===============5500867180695777793==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 06:33:42 2009
Content-Type: multipart/mixed; boundary="===============5765047117856702117=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5030 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/timertask.
Date: Tue, 14 Apr 2009 06:33:39 -0400
Message-ID:
--===============5765047117856702117==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 06:33:39 -0400 (Tue, 14 Apr 2009)
New Revision: 5030
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisoc=
ket/timertask/TimerTaskTestCase.java
Log:
JBREM-1116: Eliminated dependence on SecurityUtility.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/bisocket/timertask/TimerTaskTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/biso=
cket/timertask/TimerTaskTestCase.java 2009-04-14 10:31:53 UTC (rev 5029)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/biso=
cket/timertask/TimerTaskTestCase.java 2009-04-14 10:33:39 UTC (rev 5030)
@@ -24,6 +24,9 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.InetAddress;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -94,7 +97,7 @@
=
try
{
- SecurityUtility.getDeclaredMethod(Timer.class, "purge", new Cl=
ass[]{});
+ getDeclaredMethod(Timer.class, "purge", new Class[]{});
purgeMethodAvailable =3D true;
}
catch (Exception e)
@@ -340,4 +343,32 @@
log.info("received callback");
} =
}
+ =
+ static private Method getDeclaredMethod(final Class c, final String nam=
e, final Class[] parameterTypes)
+ throws NoSuchMethodException
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ Method m =3D c.getDeclaredMethod(name, parameterTypes);
+ m.setAccessible(true);
+ return m;
+ }
+
+ try
+ {
+ return (Method) AccessController.doPrivileged( new PrivilegedExce=
ptionAction()
+ {
+ public Object run() throws NoSuchMethodException
+ {
+ Method m =3D c.getDeclaredMethod(name, parameterTypes);
+ m.setAccessible(true);
+ return m;
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (NoSuchMethodException) e.getCause();
+ }
+ }
}
\ No newline at end of file
--===============5765047117856702117==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 06:34:30 2009
Content-Type: multipart/mixed; boundary="===============3967383925746370002=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5031 -
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/proxy.
Date: Tue, 14 Apr 2009 06:34:25 -0400
Message-ID:
--===============3967383925746370002==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: ron.sigal(a)jboss.com
Date: 2009-04-14 06:34:23 -0400 (Tue, 14 Apr 2009)
New Revision: 5031
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http/=
proxy/ProxyAuthenticationTestCase.java
Log:
JBREM-1116: Eliminated dependence on SecurityUtility.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transpor=
t/http/proxy/ProxyAuthenticationTestCase.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http=
/proxy/ProxyAuthenticationTestCase.java 2009-04-14 10:33:39 UTC (rev 5030)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/http=
/proxy/ProxyAuthenticationTestCase.java 2009-04-14 10:34:23 UTC (rev 5031)
@@ -27,6 +27,9 @@
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
=
@@ -119,11 +122,11 @@
setupServer();
=
// Set system properties.
- SecurityUtility.setSystemProperty("http.proxyHost", server.host);
- SecurityUtility.setSystemProperty("http.proxyPort", Integer.toString=
(server.port));
- SecurityUtility.setSystemProperty("proxySet", "true");
- SecurityUtility.setSystemProperty("http.proxy.username", "sysprop");
- SecurityUtility.setSystemProperty("http.proxy.password", "abc");
+ setSystemProperty("http.proxyHost", server.host);
+ setSystemProperty("http.proxyPort", Integer.toString(server.port));
+ setSystemProperty("proxySet", "true");
+ setSystemProperty("http.proxy.username", "sysprop");
+ setSystemProperty("http.proxy.password", "abc");
=
// Create invocation metadata map.
HashMap metadata =3D new HashMap();
@@ -149,8 +152,8 @@
setupServer();
=
// Set system properties.
- SecurityUtility.setSystemProperty("http.proxy.username", "sysprop");
- SecurityUtility.setSystemProperty("http.proxy.password", "abc"); =
+ setSystemProperty("http.proxy.username", "sysprop");
+ setSystemProperty("http.proxy.password", "abc"); =
=
// Create invocation metadata map.
HashMap metadata =3D new HashMap();
@@ -177,8 +180,8 @@
setupServer();
=
// Set system properties.
- SecurityUtility.setSystemProperty("http.proxy.username", "sysprop");
- SecurityUtility.setSystemProperty("http.proxy.password", "abc"); =
+ setSystemProperty("http.proxy.username", "sysprop");
+ setSystemProperty("http.proxy.password", "abc"); =
=
// Create invocation metadata map.
HashMap metadata =3D new HashMap();
@@ -305,4 +308,28 @@
return auth;
}
}
+ =
+ static private void setSystemProperty(final String name, final String v=
alue)
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ System.setProperty(name, value);
+ return;
+ }
+ =
+ try
+ {
+ AccessController.doPrivileged( new PrivilegedExceptionAction()
+ {
+ public Object run() throws Exception
+ {
+ return System.setProperty(name, value);
+ }
+ });
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw (RuntimeException) e.getCause();
+ }
+ }
}
\ No newline at end of file
--===============3967383925746370002==--
From jboss-remoting-commits at lists.jboss.org Tue Apr 14 13:18:15 2009
Content-Type: multipart/mixed; boundary="===============5211739153465984071=="
MIME-Version: 1.0
From: jboss-remoting-commits at lists.jboss.org
To: jboss-remoting-commits at lists.jboss.org
Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5032 - in
remoting3/trunk: jboss-remoting/src/main/java/org/jboss/remoting3/spi and 2
other directories.
Date: Tue, 14 Apr 2009 13:18:15 -0400
Message-ID:
--===============5211739153465984071==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: david.lloyd(a)jboss.com
Date: 2009-04-14 13:18:15 -0400 (Tue, 14 Apr 2009)
New Revision: 5032
Added:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ClientC=
onnector.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ClientS=
ourceConnector.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoin=
tConnector.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Resourc=
eType.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
LocationListener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
RegistrationListener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
Specification.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/Can=
cellable.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/Con=
nectionProvider.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/End=
pointConnection.java
Removed:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FutureC=
lientSource.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RemoteS=
erviceConfiguration.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
Listener.java
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ClientS=
ource.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoin=
t.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoin=
tImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Handlea=
bleCloseable.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Remotin=
g.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Request=
Listener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
Registration.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Service=
URI.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/Rem=
oteRequestContext.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/Req=
uestHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/Req=
uestHandlerSource.java
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/Endpoin=
tTestCase.java
remoting3/trunk/samples/src/test/java/org/jboss/remoting3/samples/protoc=
ol/basic/BasicTestCase.java
Log:
Endpoint API changes for working connection management, part 1
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Cli=
entConnector.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Connector.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Connector.java 2009-04-14 17:18:15 UTC (rev 5032)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
+
+import java.net.URI;
+import org.jboss.xnio.IoFuture;
+
+/**
+ * A client connector. Opens a connection to a URI which provides a singl=
e {@code Client} instance. Instances of this
+ * interface may only be able to support a single URI scheme. Depending o=
n the implementation, the URI may be a
+ * protocol URI or a service URI.
+ */
+public interface ClientConnector extends HandleableCloseable {
+
+ /**
+ * Establish a client connection.
+ *
+ * @param requestType the request class
+ * @param replyType the reply class
+ * @param connectUri the URI to connect to
+ * @param the request type
+ * @param the reply type
+ * @return the future client
+ * @throws IllegalArgumentException if the provided URI scheme is not =
supported by this connector
+ */
+ IoFuture extends Client> openClient(Class requestTyp=
e, Class replyType, URI connectUri) throws IllegalArgumentException;
+}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
ClientSource.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Source.java 2009-04-14 10:34:23 UTC (rev 5031)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
Source.java 2009-04-14 17:18:15 UTC (rev 5032)
@@ -22,25 +22,17 @@
=
package org.jboss.remoting3;
=
-import java.io.IOException;
-
/**
- * A source for new Remoting contexts.
+ * A source for new Remoting clients.
*
* @param the request type
* @param the reply type
*/
public interface ClientSource extends HandleableCloseable> {
/**
- * Close the context source. New contexts may no longer be created af=
ter this
- * method is called. Subsequent calls to this method have no addition=
al effect.
- */
- void close() throws IOException;
-
- /**
- * Create a new communications context.
+ * Create a new client instance.
*
- * @return the new context
+ * @return the client
*/
- Client createClient() throws IOException;
+ Client createClient();
}
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Cli=
entSourceConnector.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
SourceConnector.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client=
SourceConnector.java 2009-04-14 17:18:15 UTC (rev 5032)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
+
+import java.net.URI;
+import org.jboss.xnio.IoFuture;
+
+/**
+ * A client source connector. Opens a connection to a URI which provides =
a {@code ClientSource} instance. Instances of this
+ * interface may only be able to support a single URI scheme. Depending o=
n the implementation, the URI may be a
+ * protocol URI or a service URI.
+ */
+public interface ClientSourceConnector extends HandleableCloseable {
+
+ /**
+ * Establish a client source connection.
+ *
+ * @param requestType the request class
+ * @param replyType the reply class
+ * @param connectUri the URI to connect to
+ * @param the request type
+ * @param the reply type
+ * @return the future client
+ * @throws IllegalArgumentException if the provided URI scheme is not =
supported by this connector
+ */
+ IoFuture extends ClientSource> openClientSource(Class requestType, Class replyType, URI connectUri) throws IllegalArgumentEx=
ception;
+}
\ No newline at end of file
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
Endpoint.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
nt.java 2009-04-14 10:34:23 UTC (rev 5031)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
nt.java 2009-04-14 17:18:15 UTC (rev 5032)
@@ -1,11 +1,14 @@
package org.jboss.remoting3;
=
+import java.io.Closeable;
import java.io.IOException;
import java.net.URI;
+import java.util.Set;
import java.util.concurrent.ConcurrentMap;
import org.jboss.remoting3.spi.Handle;
import org.jboss.remoting3.spi.RequestHandler;
import org.jboss.remoting3.spi.RequestHandlerSource;
+import org.jboss.remoting3.spi.ConnectionProvider;
import org.jboss.xnio.IoFuture;
=
/**
@@ -45,7 +48,7 @@
* @return a handle for the client
* @throws IOException if an error occurs
*/
- Handle createRequestHandler(RequestListener requestListener, final Class requestClass, final Class replyClass)=
throws IOException;
+ Handle createLocalRequestHandler(RequestListene=
r requestListener, final Class requestClass, final Class replyC=
lass) throws IOException;
=
/**
* Create a request handler source that can be used to acquire clients=
associated with a request listener on this endpoint.
@@ -62,6 +65,15 @@
Handle registerService(LocalServiceConfig=
uration configuration) throws IOException;
=
/**
+ * Add a service registration listener which is called whenever a loca=
l service is registered.
+ *
+ * @param listener the listener
+ * @param flags the flags to apply to the listener
+ * @return a handle which may be used to remove the listener registrat=
ion
+ */
+ SimpleCloseable addServiceRegistrationListener(ServiceRegistrationList=
ener listener, Set flags);
+
+ /**
* Create a client that uses the given request handler to handle its r=
equests.
*
* You must have the {@link org.jboss.remoting3.EndpointPermission cre=
ateClient EndpointPermission} to invoke this method.
@@ -92,42 +104,63 @@
ClientSource createClientSource(RequestHandlerSource hand=
lerSource, Class requestClass, Class replyClass) throws IOException;
=
/**
- * Attempt to locate a service. The return value then be queried for =
the service's {@code ClientSource}.
+ * Attempt to open a client source by URI.
*
* @param the request type
* @param the reply type
- * @param serviceUri the URI of the service
+ * @param uri the URI of the service
* @param requestClass the class of requests sent through the client s=
ource
* @param replyClass the class of replies received back through the cl=
ient source
* @return the future service
- * @throws IllegalArgumentException if the given URI is not a valid Re=
moting service URI
+ * @throws IllegalArgumentException if the URI scheme does not corresp=
ond to a client souerce connection provider
*/
- IoFuture> locateService(URI serviceUri, Clas=
s requestClass, Class replyClass) throws IllegalArgumentException;
+ IoFuture extends ClientSource> openClientSource(URI uri=
, Class requestClass, Class replyClass) throws IllegalArgumentExcepti=
on;
=
/**
- * Register a remotely available service.
- * The remote endpoint must not have the same name as this endpoint. =
The group name and service type must be
- * non-{@code null} and non-empty. The metric must be greater than ze=
ro.
+ * Attempt to open a client by URI.
*
- * You must have the {@link org.jboss.remoting3.EndpointPermission reg=
isterRemoteService EndpointPermission} to invoke this method.
+ * @param the request type
+ * @param the reply type
+ * @param uri the URI of the service
+ * @param requestClass the class of requests sent through the client s=
ource
+ * @param replyClass the class of replies received back through the cl=
ient source
+ * @return the future service
+ * @throws IllegalArgumentException if the URI scheme does not corresp=
ond to a client connection provider
+ */
+ IoFuture extends Client> openClient(URI uri, Class r=
equestClass, Class replyClass) throws IllegalArgumentException;
+
+ /**
+ * Connect to a remote endpoint.
*
- * @param configuration the remote service configuration
- * @return a closeable that may be used to remove the registration
- * @throws IllegalArgumentException if one of the given arguments was =
not valid
- * @throws IOException if an error occurs with the registration
+ * @param endpointUri the URI of the endpoint to connect to
+ * @return the future connection
+ * @throws IllegalArgumentException if the URI scheme does not corresp=
ond to an endpoint connection provider
*/
- SimpleCloseable registerRemoteService(RemoteServiceConfiguration confi=
guration) throws IllegalArgumentException, IOException;
+ IoFuture extends Closeable> openEndpointConnection(URI endpointUri) =
throws IllegalArgumentException;
=
/**
- * Add a listener for observing when local and remote services are add=
ed. The caller may specify whether the listener
- * should be notified of the complete list of currently registered ser=
vices (set {@code onlyNew} to {@code false})
- * or only services registered after the time of calling this method (=
set {@code onlyNew} to {@code true}).
+ * Register a connection provider for a URI scheme.
*
- * You must have the {@link org.jboss.remoting3.EndpointPermission add=
ServiceListener EndpointPermission} to invoke this method.
+ * @param uriScheme the URI scheme
+ * @param provider the provider
+ * @return a handle which may be used to remove the registration
+ */
+ SimpleCloseable addConnectionProvider(String uriScheme, ConnectionProv=
ider> provider);
+
+ /**
+ * Get the type of resource specified by the given URI. If the type c=
annot be determined, returns {@link org.jboss.remoting3.ResourceType#UNKNOW=
N UNKNOWN}.
*
- * @param serviceListener the listener
- * @param onlyNew {@code true} if only new registrations should be sen=
t to the listener
- * @return a handle which may be used to unregister the listener
+ * @param uri the connection URI
+ * @return the resource type
*/
- SimpleCloseable addServiceListener(ServiceListener serviceListener, bo=
olean onlyNew);
+ ResourceType getResourceType(URI uri);
+
+
+ enum ListenerFlag {
+
+ /**
+ * Include old registrations.
+ */
+ INCLUDE_OLD,
+ }
}
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/End=
pointConnector.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
ntConnector.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
ntConnector.java 2009-04-14 17:18:15 UTC (rev 5032)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, 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.remoting3;
+
+import java.net.URI;
+import org.jboss.xnio.IoFuture;
+
+/**
+ * An endpoint connector. Used to connect a whole endpoint to another who=
le endpoint. Typically, services are then
+ * shared between the endpoints in some fashion, though this need not be t=
he case.
+ */
+public interface EndpointConnector extends HandleableCloseable {
+
+ /**
+ * Connect the given endpoint to the remote URI.
+ *
+ * @param endpoint the endpoint to connect
+ * @param connectUri the connection URI
+ * @return the future handle, which may be used to terminate the conne=
ction
+ */
+ IoFuture extends HandleableCloseable> connect(Endpoint endpoint, URI=
connectUri);
+}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/=
EndpointImpl.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
ntImpl.java 2009-04-14 10:34:23 UTC (rev 5031)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoi=
ntImpl.java 2009-04-14 17:18:15 UTC (rev 5032)
@@ -27,24 +27,31 @@
import java.lang.ref.WeakReference;
import java.net.URI;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
+import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
import org.jboss.remoting3.spi.AbstractHandleableCloseable;
import org.jboss.remoting3.spi.AbstractSimpleCloseable;
+import org.jboss.remoting3.spi.ConnectionProvider;
import org.jboss.remoting3.spi.Handle;
import org.jboss.remoting3.spi.RequestHandler;
import org.jboss.remoting3.spi.RequestHandlerSource;
-import org.jboss.xnio.FailedIoFuture;
-import org.jboss.xnio.FinishedIoFuture;
+import org.jboss.remoting3.spi.Cancellable;
+import org.jboss.remoting3.spi.EndpointConnection;
import org.jboss.xnio.IoFuture;
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.WeakCloseable;
+import org.jboss.xnio.AbstractIoFuture;
import org.jboss.xnio.log.Logger;
=
/**
@@ -57,6 +64,10 @@
Logger.getLogger("org.jboss.remoting").info("JBoss Remoting versio=
n %s", Version.VERSION);
}
=
+ static ConcurrentMap concurrentHashMap() {
+ return new ConcurrentHashMap();
+ }
+
static Map hashMap() {
return new HashMap();
}
@@ -65,23 +76,38 @@
return new HashSet();
}
=
+ static Queue concurrentLinkedQueue() {
+ return new ConcurrentLinkedQueue();
+ }
+
private static final Logger log =3D Logger.getLogger("org.jboss.remoti=
ng.endpoint");
=
private final String name;
=
- private final ConcurrentMap