JBoss Remoting SVN: r4965 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
by jboss-remoting-commits@lists.jboss.org
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/ServiceNotFoundException.java
Log:
Add a specific exception for the service-not-found situation
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceNotFoundException.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceNotFoundException.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceNotFoundException.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 up which is not registered anywhere.
+ */
+public final class ServiceNotFoundException extends RemotingException {
+
+ private static final long serialVersionUID = -998858276817298658L;
+
+ private final URI serviceUri;
+
+ /**
+ * Constructs a <tt>ServiceNotFoundException</tt> with no detail message. The cause is not initialized, and may
+ * subsequently be initialized by a call to {@link #initCause(Throwable) initCause}.
+ *
+ * @param uri the service URI that could not be found
+ */
+ public ServiceNotFoundException(final URI uri) {
+ serviceUri = uri;
+ }
+
+ /**
+ * Constructs a <tt>ServiceNotFoundException</tt> with the specified detail message. The cause is not initialized, and
+ * may subsequently be initialized by a call to {@link #initCause(Throwable) 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 = uri;
+ }
+
+ /**
+ * Constructs a <tt>ServiceNotFoundException</tt> with the specified cause. The detail message is set to:
+ * <pre>
+ * (cause == null ? null : cause.toString())</pre>
+ * (which typically contains the class and detail message of <tt>cause</tt>).
+ *
+ * @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 = uri;
+ }
+
+ /**
+ * Constructs a <tt>ServiceNotFoundException</tt> with the specified detail 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 = 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;
+ }
+}
15 years, 7 months
JBoss Remoting SVN: r4964 - in remoting2/branches/2.x/src/tests/org/jboss/test/remoting: datatype and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
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/DataTypeRaceTestCase.java
Log:
JBREM-1109: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataTypeRaceTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataTypeRaceTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/datatype/DataTypeRaceTestCase.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 <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Apr 8, 2009
+ * </p>
+ */
+public class DataTypeRaceTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(DataTypeRaceTestCase.class);
+
+ private static boolean firstTime = 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 = new Object();
+
+
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime = false;
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout = new PatternLayout(pattern);
+ ConsoleAppender consoleAppender = new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender);
+ }
+ }
+
+
+ public void tearDown()
+ {
+ }
+
+
+ public void testDataTypeRace() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ setupServer();
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test datatype race.
+ MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
+
+ int THREADS = 2000;
+ TestThread[] threads = new TestThread[THREADS];
+ Rendezvous startBarrier = new Rendezvous(THREADS);
+ Rendezvous stopBarrier = new Rendezvous(THREADS + 1);
+
+ log.info(getName() + " creating " + THREADS + " threads");
+ for (int i = 0; i < THREADS; i++)
+ {
+ threads[i] = new TestThread(clientInvoker, startBarrier, stopBarrier, i);
+ threads[i].start();
+ }
+
+ log.info(getName() + " waiting on stopBarrier");
+ rendezvous(stopBarrier);
+ log.info(getName() + " checking threads");
+
+ for (int i = 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 = InetAddress.getLocalHost().getHostAddress();
+ port = PortUtil.findFreePort(host);
+ locatorURI = getTransport() + "://" + host + ":" + port;
+ String metadata = System.getProperty("remoting.metadata");
+ if (metadata != null)
+ {
+ locatorURI += "/?" + metadata;
+ }
+ serverLocator = new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorURI);
+ HashMap config = new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector = new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler = new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ }
+
+
+ protected void shutdownServer() throws Exception
+ {
+ if (connector != null)
+ connector.stop();
+ }
+
+
+ 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 Throwable
+ {
+ 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 = new InvocationRequest(null, null, "abc", null, null, null);
+ boolean ok;
+
+ public TestThread(ClientInvoker clientInvoker, Rendezvous startBarrier, Rendezvous stopBarrier, int number)
+ {
+ this.clientInvoker = clientInvoker;
+ this.startBarrier = startBarrier;
+ this.stopBarrier = stopBarrier;
+ name = "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 = 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
15 years, 7 months
JBoss Remoting SVN: r4963 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
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/MicroRemoteClientInvoker.java
Log:
JBREM-1109: getDataType() uses localDataType to avoid race.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java 2009-04-08 07:34:23 UTC (rev 4962)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/MicroRemoteClientInvoker.java 2009-04-08 07:36:16 UTC (rev 4963)
@@ -509,11 +509,12 @@
{
if (dataType == null)
{
- dataType = getDataType(getLocator());
- if (dataType == null)
+ String localDataType = getDataType(getLocator());
+ if (localDataType == null)
{
- dataType = getDefaultDataType();
+ localDataType = getDefaultDataType();
}
+ dataType = localDataType;
}
return dataType;
}
15 years, 7 months
JBoss Remoting SVN: r4962 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting: datatype and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
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/DataTypeRaceTestCase.java
Log:
JBREM-1109: New unit test.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataTypeRaceTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataTypeRaceTestCase.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/datatype/DataTypeRaceTestCase.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 <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Apr 8, 2009
+ * </p>
+ */
+public class DataTypeRaceTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(DataTypeRaceTestCase.class);
+
+ private static boolean firstTime = 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 = new Object();
+
+
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime = false;
+ Logger.getLogger("org.jboss.remoting").setLevel(Level.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout = new PatternLayout(pattern);
+ ConsoleAppender consoleAppender = new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender);
+ }
+ }
+
+
+ public void tearDown()
+ {
+ }
+
+
+ public void testDataTypeRace() throws Throwable
+ {
+ log.info("entering " + getName());
+
+ // Start server.
+ setupServer();
+
+ // Create client.
+ InvokerLocator clientLocator = new InvokerLocator(locatorURI);
+ HashMap clientConfig = new HashMap();
+ clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Test datatype race.
+ MicroRemoteClientInvoker clientInvoker = (MicroRemoteClientInvoker) client.getInvoker();
+
+ int THREADS = 2000;
+ TestThread[] threads = new TestThread[THREADS];
+ Rendezvous startBarrier = new Rendezvous(THREADS);
+ Rendezvous stopBarrier = new Rendezvous(THREADS + 1);
+
+ log.info(getName() + " creating " + THREADS + " threads");
+ for (int i = 0; i < THREADS; i++)
+ {
+ threads[i] = new TestThread(clientInvoker, startBarrier, stopBarrier, i);
+ threads[i].start();
+ }
+
+ log.info(getName() + " waiting on stopBarrier");
+ rendezvous(stopBarrier);
+ log.info(getName() + " checking threads");
+
+ for (int i = 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 = InetAddress.getLocalHost().getHostAddress();
+ port = PortUtil.findFreePort(host);
+ locatorURI = getTransport() + "://" + host + ":" + port;
+ String metadata = System.getProperty("remoting.metadata");
+ if (metadata != null)
+ {
+ locatorURI += "/?" + metadata;
+ }
+ serverLocator = new InvokerLocator(locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorURI);
+ HashMap config = new HashMap();
+ config.put(InvokerLocator.FORCE_REMOTE, "true");
+ addExtraServerConfig(config);
+ connector = new Connector(serverLocator, config);
+ connector.create();
+ invocationHandler = new TestInvocationHandler();
+ connector.addInvocationHandler("test", invocationHandler);
+ connector.start();
+ }
+
+
+ protected void shutdownServer() throws Exception
+ {
+ if (connector != null)
+ connector.stop();
+ }
+
+
+ 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 Throwable
+ {
+ 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 = new InvocationRequest(null, null, "abc", null, null, null);
+ boolean ok;
+
+ public TestThread(ClientInvoker clientInvoker, Rendezvous startBarrier, Rendezvous stopBarrier, int number)
+ {
+ this.clientInvoker = clientInvoker;
+ this.startBarrier = startBarrier;
+ this.stopBarrier = stopBarrier;
+ name = "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 = 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
15 years, 7 months
JBoss Remoting SVN: r4961 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 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/ConnectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: Doubled lease period to 2000 ms.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2009-04-05 06:59:03 UTC (rev 4960)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2009-04-07 07:55:05 UTC (rev 4961)
@@ -490,7 +490,7 @@
log.info("Starting remoting server with locator uri of: " + locatorURI);
HashMap config = new HashMap();
config.put(InvokerLocator.FORCE_REMOTE, "true");
- config.put("leasePeriod", "1000");
+ config.put("leasePeriod", "2000");
addExtraServerConfig(config);
connector = new Connector(serverLocator, config);
connector.create();
15 years, 7 months
JBoss Remoting SVN: r4960 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet.
by jboss-remoting-commits@lists.jboss.org
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/servlet/readme.txt
Log:
JBREM-139: Added note that JBREM-139 is done.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/readme.txt
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/readme.txt 2009-04-05 06:58:47 UTC (rev 4959)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/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 build) to the deploy directory.
15 years, 7 months
JBoss Remoting SVN: r4959 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
by jboss-remoting-commits@lists.jboss.org
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/servlet/ssl/SSLServletInvokerTestClient.java
Log:
JBREM-139: Renamed .truststore to truststore.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/SSLServletInvokerTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/SSLServletInvokerTestClient.java 2009-04-05 06:58:00 UTC (rev 4958)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/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 = this.getClass().getResource(".truststore").getFile();
+ String trustStoreFilePath = this.getClass().getResource("truststore").getFile();
System.setProperty("javax.net.ssl.trustStore", trustStoreFilePath);
15 years, 7 months
JBoss Remoting SVN: r4958 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/WEB-INF.
by jboss-remoting-commits@lists.jboss.org
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/servlet/ssl/WEB-INF/web.xml
Log:
JBREM-139: Removed commented locatorUrl entry.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/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/servlet/ssl/WEB-INF/web.xml 2009-04-05 06:58:00 UTC (rev 4958)
@@ -18,11 +18,6 @@
<param-name>locatorUrl</param-name>
<param-value>sslservlet://localhost:8443/servlet-invoker/ServerInvokerServlet/?createUniqueObjectName=true</param-value>
<description>The servlet server invoker locator url</description>
-<!--
- <param-name>locatorUrl</param-name>
- <param-value>sslservlet://localhost:8443/servlet-invoker/ServerInvokerServlet</param-value>
- <description>The servlet server invoker locator url</description>
--->
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
15 years, 7 months
JBoss Remoting SVN: r4957 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl.
by jboss-remoting-commits@lists.jboss.org
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/servlet/ssl/server.xml
Log:
JBREM-139: Created a single server.xml in .../servlet directory for all servlet tests.
Deleted: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/server.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/server.xml 2009-04-05 06:57:08 UTC (rev 4956)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/ssl/server.xml 2009-04-05 06:57:26 UTC (rev 4957)
@@ -1,169 +0,0 @@
-<Server>
-
- <!--APR library loader. Documentation at /docs/apr.html -->
- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
- <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
- <Listener className="org.apache.catalina.core.JasperListener" />
-
- <!-- Use a custom version of StandardService that allows the
- connectors to be started independent of the normal lifecycle
- start to allow web apps to be deployed before starting the
- connectors.
- -->
- <Service name="jboss.web">
-
- <!-- A "Connector" represents an endpoint by which requests are received
- and responses are returned. Documentation at :
- Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
- Java AJP Connector: /docs/config/ajp.html
- APR (HTTP/AJP) Connector: /docs/apr.html
- Define a non-SSL HTTP/1.1 Connector on port 8080
- -->
- <Connector port="8080" address="${jboss.bind.address}"
- maxThreads="250" maxHttpHeaderSize="8192"
- emptySessionPath="true" protocol="HTTP/1.1"
- enableLookups="false" redirectPort="8443" acceptCount="100"
- connectionTimeout="20000" disableUploadTimeout="true" />
-
- <!-- Define a SSL HTTP/1.1 Connector on port 8443
- This connector uses the JSSE configuration, when using APR, the
- connector should be using the OpenSSL style configuration
- described in the APR documentation -->
- <!---->
- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
- maxThreads="150" scheme="https" secure="true"
- clientAuth="false" sslProtocol="TLS"
- keystoreFile="${jboss.server.home.dir}/conf/keystore"
- keystorePass="unit-tests-server"/>
- <!---->
-
- <!-- Define an AJP 1.3 Connector on port 8009 -->
- <Connector port="8009" address="${jboss.bind.address}" protocol="AJP/1.3"
- emptySessionPath="true" enableLookups="false" redirectPort="8443" />
-
- <Engine name="jboss.web" defaultHost="localhost">
-
- <!-- The JAAS based authentication and authorization realm implementation
- that is compatible with the jboss 3.2.x realm implementation.
- - certificatePrincipal : the class name of the
- org.jboss.security.auth.certs.CertificatePrincipal impl
- used for mapping X509[] cert chains to a Princpal.
- - allRolesMode : how to handle an auth-constraint with a role-name=*,
- one of strict, authOnly, strictAuthOnly
- + strict = Use the strict servlet spec interpretation which requires
- that the user have one of the web-app/security-role/role-name
- + authOnly = Allow any authenticated user
- + strictAuthOnly = Allow any authenticated user only if there are no
- web-app/security-roles
- -->
- <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
- certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
- allRolesMode="authOnly"
- />
- <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
- behavior of JBossSecurityMgrRealm, but overrides the authorization
- checks to use JACC permissions with the current java.security.Policy
- to determine authorized access.
- - allRolesMode : how to handle an auth-constraint with a role-name=*,
- one of strict, authOnly, strictAuthOnly
- + strict = Use the strict servlet spec interpretation which requires
- that the user have one of the web-app/security-role/role-name
- + authOnly = Allow any authenticated user
- + strictAuthOnly = Allow any authenticated user only if there are no
- web-app/security-roles
- <Realm className="org.jboss.web.tomcat.security.JaccAuthorizationRealm"
- certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
- allRolesMode="authOnly"
- />
- -->
-
- <Host name="localhost"
- autoDeploy="false" deployOnStartup="false" deployXML="false"
- configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
- >
-
- <!-- Uncomment to enable request dumper. This Valve "logs interesting
- contents from the specified Request (before processing) and the
- corresponding Response (after processing). It is especially useful
- in debugging problems related to headers and cookies."
- -->
- <!--
- <Valve className="org.apache.catalina.valves.RequestDumperValve" />
- -->
-
- <!-- Access logger -->
- <!--
- <Valve className="org.apache.catalina.valves.AccessLogValve"
- prefix="localhost_access_log." suffix=".log"
- pattern="common" directory="${jboss.server.home.dir}/log"
- resolveHosts="false" />
- -->
-
- <!-- Uncomment to enable single sign-on across web apps
- deployed to this host. Does not provide SSO across a cluster.
-
- If this valve is used, do not use the JBoss ClusteredSingleSignOn
- valve shown below.
-
- A new configuration attribute is available beginning with
- release 4.0.4:
-
- cookieDomain configures the domain to which the SSO cookie
- will be scoped (i.e. the set of hosts to
- which the cookie will be presented). By default
- the cookie is scoped to "/", meaning the host
- that presented it. Set cookieDomain to a
- wider domain (e.g. "xyz.com") to allow an SSO
- to span more than one hostname.
- -->
- <!--
- <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
- -->
-
- <!-- Uncomment to enable single sign-on across web apps
- deployed to this host AND to all other hosts in the cluster.
-
- If this valve is used, do not use the standard Tomcat SingleSignOn
- valve shown above.
-
- Valve uses a JBossCache instance to support SSO credential
- caching and replication across the cluster. The JBossCache
- instance must be configured separately. By default, the valve
- shares a JBossCache with the service that supports HttpSession
- replication. See the "jboss-web-cluster-service.xml" file in the
- server/all/deploy directory for cache configuration details.
-
- Besides the attributes supported by the standard Tomcat
- SingleSignOn valve (see the Tomcat docs), this version also
- supports the following attributes:
-
- cookieDomain see above
-
- treeCacheName JMX ObjectName of the JBossCache MBean used to
- support credential caching and replication across
- the cluster. If not set, the default value is
- "jboss.cache:service=TomcatClusteringCache", the
- standard ObjectName of the JBossCache MBean used
- to support session replication.
- -->
- <!--
- <Valve className="org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn" />
- -->
-
- <!-- Check for unclosed connections and transaction terminated checks
- in servlets/jsps.
-
- Important: The dependency on the CachedConnectionManager
- in META-INF/jboss-service.xml must be uncommented, too
- -->
- <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
- cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
- transactionManagerObjectName="jboss:service=TransactionManager" />
-
- </Host>
-
- </Engine>
-
- </Service>
-
-</Server>
\ No newline at end of file
15 years, 7 months
JBoss Remoting SVN: r4956 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback: WEB-INF and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
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/servlet/callback/WEB-INF/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/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/servlet/callback/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/WEB-INF/web.xml (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/callback/WEB-INF/web.xml 2009-04-05 06:57:08 UTC (rev 4956)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!-- The the JBossRemoting server invoker servlet web.xml descriptor
+$Id: web.xml 4837 2009-01-18 05:40:05Z ron.sigal(a)jboss.com $
+-->
+<web-app>
+ <servlet>
+ <servlet-name>ServerInvokerServlet</servlet-name>
+ <description>The ServerInvokerServlet receives requests via HTTP
+ protocol from within a web container and passes it onto the
+ ServletServerInvoker for processing.
+ </description>
+ <servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
+ <init-param>
+ <param-name>locatorUrl</param-name>
+ <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?createUniqueObjectName=true&useAllParams=true&blockingMode=blocking</param-value>
+ <description>The servlet server invoker locator url</description>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ServerInvokerServlet</servlet-name>
+ <url-pattern>/ServerInvokerServlet/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
15 years, 7 months