JBoss Remoting SVN: r5745 - remoting2/branches/2.2/docs.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-21 10:03:23 -0500 (Sun, 21 Feb 2010)
New Revision: 5745
Removed:
remoting2/branches/2.2/docs/multiplex.pdf
Log:
JBREM-1187: removed multiplex.pdf.
Deleted: remoting2/branches/2.2/docs/multiplex.pdf
===================================================================
(Binary files differ)
14 years, 9 months
JBoss Remoting SVN: r5744 - in remoting2/branches/2.2/src/etc/lib: remoting_2_2_3_SP1 and 1 other directory.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-21 10:01:50 -0500 (Sun, 21 Feb 2010)
New Revision: 5744
Added:
remoting2/branches/2.2/src/etc/lib/remoting_2_2_3_SP1/
remoting2/branches/2.2/src/etc/lib/remoting_2_2_3_SP1/jboss-remoting.jar
Log:
JBREM-1186: Added 2.2.3.SP1 jboss-remoting.jar for versioning tests..
Added: remoting2/branches/2.2/src/etc/lib/remoting_2_2_3_SP1/jboss-remoting.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.2/src/etc/lib/remoting_2_2_3_SP1/jboss-remoting.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 9 months
JBoss Remoting SVN: r5743 - remoting2/branches/2.2.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-21 09:55:08 -0500 (Sun, 21 Feb 2010)
New Revision: 5743
Modified:
remoting2/branches/2.2/build.xml
Log:
JBREM-1186: Added 2.2.3.SP1 to versioning tests; JBREM-1187: updated version to 2.2.3.SP2; improved one-test target.
Modified: remoting2/branches/2.2/build.xml
===================================================================
--- remoting2/branches/2.2/build.xml 2010-02-21 14:52:47 UTC (rev 5742)
+++ remoting2/branches/2.2/build.xml 2010-02-21 14:55:08 UTC (rev 5743)
@@ -1,14 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+* 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.
+-->
-<!-- ====================================================================== -->
-<!-- -->
-<!-- JBoss, the OpenSource J2EE webOS -->
-<!-- -->
-<!-- Distributable under LGPL license. -->
-<!-- See terms of license at http://www.gnu.org. -->
-<!-- -->
-<!-- ====================================================================== -->
-
<!-- $Id$ -->
<project default="most" name="JBossRemoting">
@@ -71,9 +83,9 @@
<!-- Module name(s) & version -->
<property name="module.name" value="remoting"/>
<property name="module.Name" value="JBoss Remoting"/>
- <property name="module.version" value="2.2.3.SP1"/>
+ <property name="module.version" value="2.2.3.SP2"/>
<!-- extension is for the file suffix to use for distribution build -->
- <property name="module.version.extension" value="2_2_3_SP1"/>
+ <property name="module.version.extension" value="2_2_3_SP2"/>
<property name="implementation.url" value="http://www.jboss.org/products/remoting"/>
<property name="root.dir" value="${basedir}"/>
@@ -573,9 +585,10 @@
<!-- ================================================================== -->
<!-- Tests -->
<!-- ================================================================== -->
- <target name="one-test" if="test" description="Execute a single test." depends="jars, tests.jars">
+ <target name="one-test-old" if="test" description="Execute a single test." depends="jars, tests.jars">
<mkdir dir="${output.tests.results}"/>
- <junit printsummary="true" fork="yes" includeantruntime="true">
+ <mkdir dir="${output.tests.tmp}"/>
+ <junit printsummary="true" fork="yes" includeantruntime="true" tempdir="${output.tests.tmp}">
<classpath>
<path refid="tests.classpath"/>
<pathelement location="${output.lib.dir}/jboss-remoting-tests.jar"/>
@@ -583,11 +596,48 @@
<!-- this is needed for the remoting.marshall.dynamic.remote.MarshallerLoadingServer -->
<jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
<formatter type="xml"/>
- <test fork="yes" todir="${output.tests.results}" name="${test}"/>
+ <test fork="yes" todir="${output.tests.results}" name="**/*${test}*"/>
</junit>
<antcall target="tests.report.quick"/>
</target>
+
+ <target name="one-test" depends="tests.jars">
+ <junit
+ printsummary="true" fork="yes" includeantruntime="true"
+ tempdir="${output.tests.tmp}" maxmemory="1024m">
+ <jvmarg value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="tests.classpath"/>
+ </classpath>
+ <sysproperty key="${java.security.manager.key}" value="${java.security.manager}"/>
+ <sysproperty key="java.security.policy" value="${java.security.policy}"/>
+ <sysproperty key="java.security.debug" value="${java.security.debug}"/>
+ <sysproperty key="build.home" value="${basedir}"/>
+ <sysproperty key="remoting.jar.dir" value="${basedir}/output/lib"/>
+ <sysproperty key="log4j.jar.dir" value="${basedir}/lib/apache-log4j/lib"/>
+ <sysproperty key="log4j.config.dir" value="${basedir}/src/etc"/>
+ <sysproperty key="ant.library.dir" value="${ant.library.dir}"/>
+ <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
+ <sysproperty key="jrunit.bind_addr" value="${bind.address}"/>
+ <sysproperty key="jrunit.mcast_addr" value="${multicast.address}"/>
+ <sysproperty key="jrunit.mcast_port" value="${multicast.port}"/>
+ <sysproperty key="jrunit.receive_on_all_interfaces" value="${receiveOnAllInterfaces}"/>
+ <sysproperty key="jrunit.send_on_all_interfaces" value="${sendOnAllInterfaces}"/>
+ <sysproperty key="jrunit.send_interfaces" value="${sendInterfaces}"/>
+ <sysproperty key="jrunit.logdir" value="${output.tests}"/>
+ <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-${jboss-junit-configuration}.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
+ haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include name="**/remoting/**/*${test}TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
<target name="tests" description="Runs remoting functional and performance tests." depends="jars, tests.jars">
<antcall target="tests.functional.core" inheritrefs="true"/>
<!--<antcall target="tests.versioning" inheritrefs="true"/>-->
@@ -1619,6 +1669,29 @@
</antcall>
<!-- ******************************************************************************** -->
+ <!-- Current <- -> 2.2.3.SP1 -->
+ <antcall target="tests.versioning.all_transports" inheritrefs="true">
+ <param name="jboss-junit-configuration" value="2_2_3_SP1-client"/>
+ <param name="client.classpath" value="${etc.dir}/lib/remoting_2_2_3_SP1/jboss-remoting.jar"/>
+ <param name="server.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.pre_2_0_compatible" value=""/>
+ <param name="server.pre_2_0_compatible" value=""/>
+ <param name="client.version" value=""/>
+ <param name="server.version" value="2"/>
+ <param name="check_connection" value="false"/>
+ </antcall>
+ <antcall target="tests.versioning.all_transports" inheritrefs="true">
+ <param name="jboss-junit-configuration" value="2_2_3_SP1-server"/>
+ <param name="server.classpath" value="${etc.dir}/lib/remoting_2_2_3_SP1/jboss-remoting.jar"/>
+ <param name="client.classpath" value="${output.lib.dir}/jboss-remoting.jar"/>
+ <param name="client.pre_2_0_compatible" value=""/>
+ <param name="server.pre_2_0_compatible" value=""/>
+ <param name="client.version" value="2"/>
+ <param name="server.version" value=""/>
+ <param name="check_connection" value="false"/>
+ </antcall>
+
+ <!-- ******************************************************************************** -->
<!-- Current <- -> 2.2.3 -->
<antcall target="tests.versioning.all_transports" inheritrefs="true">
<param name="jboss-junit-configuration" value="2_2_3-client"/>
14 years, 9 months
JBoss Remoting SVN: r5742 - remoting2/branches/2.2/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-21 09:52:47 -0500 (Sun, 21 Feb 2010)
New Revision: 5742
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1187: Updated version to 2.2.3.SP2.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2010-02-20 19:52:58 UTC (rev 5741)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2010-02-21 14:52:47 UTC (rev 5742)
@@ -24,8 +24,6 @@
import java.lang.reflect.Method;
-import org.jboss.logging.Logger;
-
//import org.jboss.logging.Logger;
/**
@@ -38,7 +36,7 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.2.3.SP2-preview";
+ public static final String VERSION = "2.2.3.SP2";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
14 years, 9 months
JBoss Remoting SVN: r5741 - remoting2/branches/2.x/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-20 14:52:58 -0500 (Sat, 20 Feb 2010)
New Revision: 5741
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1179: Now uses reflection to get logger and logs version at DEBUG level.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java 2010-02-20 19:52:15 UTC (rev 5740)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/Version.java 2010-02-20 19:52:58 UTC (rev 5741)
@@ -22,7 +22,9 @@
package org.jboss.remoting;
+import java.lang.reflect.Method;
import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
@@ -38,7 +40,7 @@
public static final byte VERSION_2 = 2;
public static final byte VERSION_2_2 = 22;
- public static final String VERSION = "2.5.2.SP2 (Flounder)";
+ public static final String VERSION = "2.5.2.SP3-preview (Flounder)";
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
@@ -53,7 +55,20 @@
// have a static block to load the user defined version to use
static
{
- System.out.println("Remoting version: " + VERSION);
+ try
+ {
+ ClassLoader cl = getClassLoader();
+ Class c = cl.loadClass("org.jboss.logging.Logger");
+ Method getLogger = c.getMethod("getLogger", new Class[]{String.class});
+ Object logger = getLogger.invoke(null, new Object[] {"org.jboss.remoting"});
+ Method debug = c.getMethod("debug", new Class[]{Object.class});
+ debug.invoke(logger, new Object[]{"Remoting version: " + VERSION});
+ }
+ catch (Throwable t)
+ {
+ // ignore
+ }
+
boolean precompatibleFlag = false;
String precompatible = getSystemProperty(PRE_2_0_COMPATIBLE);
@@ -167,4 +182,20 @@
throw (RuntimeException) e.getCause();
}
}
+
+ static private ClassLoader getClassLoader()
+ {
+ if (SecurityUtility.skipAccessControl())
+ {
+ return Version.class.getClassLoader();
+ }
+
+ return (ClassLoader)AccessController.doPrivileged( new PrivilegedAction()
+ {
+ public Object run()
+ {
+ return Version.class.getClassLoader();
+ }
+ });
+ }
}
\ No newline at end of file
14 years, 9 months
JBoss Remoting SVN: r5740 - remoting2/branches/2.2/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-20 14:52:15 -0500 (Sat, 20 Feb 2010)
New Revision: 5740
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
Log:
JBREM-1179: Now uses reflection to get logger and logs version at DEBUG level.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2010-02-19 18:34:51 UTC (rev 5739)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Version.java 2010-02-20 19:52:15 UTC (rev 5740)
@@ -22,6 +22,12 @@
package org.jboss.remoting;
+import java.lang.reflect.Method;
+
+import org.jboss.logging.Logger;
+
+//import org.jboss.logging.Logger;
+
/**
* @author <a href="mailto:tom.elrod@jboss.com">Tom Elrod</a>
*/
@@ -36,11 +42,6 @@
private static final byte byteVersion = VERSION_2_2;
private static byte defaultByteVersion = byteVersion;
private static boolean performVersioning = true;
-
- static
- {
- System.out.println("Remoting version: " + VERSION);
- }
public static final String PRE_2_0_COMPATIBLE = "jboss.remoting.pre_2_0_compatible";
@@ -52,6 +53,20 @@
// have a static block to load the user defined version to use
static
{
+ try
+ {
+ ClassLoader cl = Version.class.getClassLoader();
+ Class c = cl.loadClass("org.jboss.logging.Logger");
+ Method getLogger = c.getMethod("getLogger", new Class[]{String.class});
+ Object logger = getLogger.invoke(null, new Object[] {"org.jboss.remoting"});
+ Method debug = c.getMethod("debug", new Class[]{Object.class});
+ debug.invoke(logger, new Object[]{"Remoting version: " + VERSION});
+ }
+ catch (Throwable t)
+ {
+ // ignore
+ }
+
boolean precompatibleFlag = false;
String precompatible = System.getProperty(PRE_2_0_COMPATIBLE);
if(precompatible != null && precompatible.length() > 0)
14 years, 9 months
JBoss Remoting SVN: r5739 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-19 13:34:51 -0500 (Fri, 19 Feb 2010)
New Revision: 5739
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java
Log:
JBREM-1188: configureParameters() sets timeout to SO_TIMEOUT_DEFAULT.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java 2010-02-19 18:34:06 UTC (rev 5738)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/SocketClientInvoker.java 2010-02-19 18:34:51 UTC (rev 5739)
@@ -88,6 +88,10 @@
protected void configureParameters()
{
super.configureParameters();
+
+ // For JBREM-1188
+ timeout = SO_TIMEOUT_DEFAULT;
+
Map params = configuration;
if (params != null)
{
14 years, 9 months
JBoss Remoting SVN: r5738 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-19 13:34:06 -0500 (Fri, 19 Feb 2010)
New Revision: 5738
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SocketDefaultTimeoutTestCase.java
Log:
JBREM-1188: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SocketDefaultTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SocketDefaultTimeoutTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SocketDefaultTimeoutTestCase.java 2010-02-19 18:34:06 UTC (rev 5738)
@@ -0,0 +1,241 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.socket.timeout;
+
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.PatternLayout;
+import org.jboss.logging.XLevel;
+import org.jboss.remoting.Client;
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.InvokerRegistry;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+import org.jboss.remoting.transport.ClientFactory;
+import org.jboss.remoting.transport.ClientInvoker;
+import org.jboss.remoting.transport.Connector;
+import org.jboss.remoting.transport.PortUtil;
+import org.jboss.remoting.transport.ServerFactory;
+import org.jboss.remoting.transport.socket.ServerAddress;
+import org.jboss.remoting.transport.socket.SocketClientInvoker;
+import org.jboss.remoting.transport.socket.SocketServerInvoker;
+
+
+/**
+ * Unit tests for JBREM-1188.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Feb 16, 2010
+ */
+public class SocketDefaultTimeoutTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(SocketDefaultTimeoutTestCase.class);
+
+ private static boolean firstTime = true;
+
+ protected String host;
+ protected int port;
+ protected String locatorURI;
+ protected InvokerLocator serverLocator;
+ protected Connector connector;
+ protected TestInvocationHandler invocationHandler;
+
+
+ public void setUp() throws Exception
+ {
+ if (firstTime)
+ {
+ firstTime = false;
+ Logger.getLogger("org.jboss.remoting").setLevel(XLevel.INFO);
+ Logger.getLogger("org.jboss.test.remoting").setLevel(Level.INFO);
+ String pattern = "[%d{ABSOLUTE}] [%t] %5p (%F:%L) - %m%n";
+ PatternLayout layout = new PatternLayout(pattern);
+ ConsoleAppender consoleAppender = new ConsoleAppender(layout);
+ Logger.getRootLogger().addAppender(consoleAppender);
+ }
+ InvokerRegistry.registerInvokerFactories(getTransport(), getClientFactoryClass(), TestServerFactory.class);
+ }
+
+
+ public void tearDown()
+ {
+ }
+
+
+ public void testDefaultTimeout() 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");
+ Method getServerAddress = getClientInvokerClass().getMethod("getServerAddress", new Class[]{});
+ getServerAddress.setAccessible(true);
+ ClientInvoker clientInvoker = client.getInvoker();
+ ServerAddress address = (ServerAddress) getServerAddress.invoke(clientInvoker, new Object[]{});
+ log.info("timeout in use: " + address.timeout);
+ assertEquals(SocketClientInvoker.SO_TIMEOUT_DEFAULT, address.timeout);
+
+ client.disconnect();
+ shutdownServer();
+ log.info(getName() + " PASSES");
+ }
+
+
+ protected String getTransport()
+ {
+ return "test";
+ }
+
+
+ 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 Class getClientFactoryClass()
+ {
+ return TestSocketClientFactory.class;
+ }
+
+
+ protected Class getClientInvokerClass()
+ {
+ return TestSocketClientInvoker.class;
+ }
+
+
+ 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 public class TestSocketClientInvoker extends SocketClientInvoker
+ {
+ public TestSocketClientInvoker(InvokerLocator locator, Map configuration) throws IOException
+ {
+ super(locator, configuration);
+ }
+ public TestSocketClientInvoker(InvokerLocator locator)
+ {
+ super(locator);
+ }
+ public ServerAddress getServerAddress()
+ {
+ return address;
+ }
+ public String toString()
+ {
+ return "TestSocketClientInvoker";
+ }
+ }
+
+
+ public static class TestSocketClientFactory implements ClientFactory
+ {
+ public ClientInvoker createClientInvoker(InvokerLocator locator, Map config) throws IOException
+ {
+ ClientInvoker clientInvoker = new TestSocketClientInvoker(locator, config);
+ log.info("TestClientFaotory.createClientInvoker() returning " + clientInvoker);
+ return clientInvoker;
+ }
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+
+
+ public static class TestServerFactory implements ServerFactory
+ {
+ public ServerInvoker createServerInvoker(InvokerLocator locator, Map config) throws IOException
+ {
+ log.info("TestServerFactory.createServerInvoker() called");
+ return new SocketServerInvoker(locator, config);
+ }
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+}
\ No newline at end of file
14 years, 9 months
JBoss Remoting SVN: r5737 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/timeout.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-19 13:32:45 -0500 (Fri, 19 Feb 2010)
New Revision: 5737
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/timeout/SSLSocketDefaultTimeoutTestCase.java
Log:
JBREM-1188: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/timeout/SSLSocketDefaultTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/timeout/SSLSocketDefaultTimeoutTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/timeout/SSLSocketDefaultTimeoutTestCase.java 2010-02-19 18:32:45 UTC (rev 5737)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.socket.ssl.timeout;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.ClientFactory;
+import org.jboss.remoting.transport.ClientInvoker;
+import org.jboss.remoting.transport.socket.ServerAddress;
+import org.jboss.remoting.transport.sslsocket.SSLSocketClientInvoker;
+import org.jboss.test.remoting.transport.socket.timeout.SocketDefaultTimeoutTestCase;
+
+
+/**
+ * Unit tests for JBREM-1188.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Feb 16, 2010
+ */
+public class SSLSocketDefaultTimeoutTestCase extends SocketDefaultTimeoutTestCase
+{
+ private static Logger log = Logger.getLogger(SSLSocketDefaultTimeoutTestCase.class);
+
+
+ protected Class getClientFactoryClass()
+ {
+ return TestSSLSocketClientFactory.class;
+ }
+
+
+ protected Class getClientInvokerClass()
+ {
+ return TestSSLSocketClientInvoker.class;
+ }
+
+
+ public static class TestSSLSocketClientFactory implements ClientFactory
+ {
+ public ClientInvoker createClientInvoker(InvokerLocator locator, Map config) throws IOException
+ {
+ ClientInvoker clientInvoker = new TestSSLSocketClientInvoker(locator, config);
+ log.info("TestClientFaotory.createClientInvoker() returning " + clientInvoker);
+ return clientInvoker;
+ }
+ public boolean supportsSSL()
+ {
+ return true;
+ }
+ }
+
+
+ public static class TestSSLSocketClientInvoker extends SSLSocketClientInvoker
+ {
+ public TestSSLSocketClientInvoker(InvokerLocator locator, Map configuration) throws IOException
+ {
+ super(locator, configuration);
+ }
+ public TestSSLSocketClientInvoker(InvokerLocator locator) throws IOException
+ {
+ super(locator);
+ }
+ public ServerAddress getServerAddress()
+ {
+ return address;
+ }
+ public String toString()
+ {
+ return "TestSSLSocketClientInvoker";
+ }
+ }
+}
\ No newline at end of file
14 years, 9 months
JBoss Remoting SVN: r5736 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/timeout.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-02-19 13:32:12 -0500 (Fri, 19 Feb 2010)
New Revision: 5736
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/BisocketDefaultTimeoutTestCase.java
Log:
JBREM-1188: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/BisocketDefaultTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/BisocketDefaultTimeoutTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/BisocketDefaultTimeoutTestCase.java 2010-02-19 18:32:12 UTC (rev 5736)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.bisocket.timeout;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.remoting.transport.ClientFactory;
+import org.jboss.remoting.transport.ClientInvoker;
+import org.jboss.remoting.transport.bisocket.BisocketClientInvoker;
+import org.jboss.remoting.transport.socket.ServerAddress;
+import org.jboss.test.remoting.transport.socket.timeout.SocketDefaultTimeoutTestCase;
+
+
+/**
+ * Unit tests for JBREM-1188.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Feb 16, 2010
+ */
+public class BisocketDefaultTimeoutTestCase extends SocketDefaultTimeoutTestCase
+{
+ private static Logger log = Logger.getLogger(BisocketDefaultTimeoutTestCase.class);
+
+
+ protected Class getClientFactoryClass()
+ {
+ return TestBisocketClientFactory.class;
+ }
+
+
+ protected Class getClientInvokerClass()
+ {
+ return TestBisocketClientInvoker.class;
+ }
+
+
+ public static class TestBisocketClientFactory implements ClientFactory
+ {
+ public ClientInvoker createClientInvoker(InvokerLocator locator, Map config) throws IOException
+ {
+ ClientInvoker clientInvoker = new TestBisocketClientInvoker(locator, config);
+ log.info("TestClientFaotory.createClientInvoker() returning " + clientInvoker);
+ return clientInvoker;
+ }
+ public boolean supportsSSL()
+ {
+ return false;
+ }
+ }
+
+
+ public static class TestBisocketClientInvoker extends BisocketClientInvoker
+ {
+ public TestBisocketClientInvoker(InvokerLocator locator, Map configuration) throws IOException
+ {
+ super(locator, configuration);
+ }
+ public TestBisocketClientInvoker(InvokerLocator locator) throws IOException
+ {
+ super(locator);
+ }
+ public ServerAddress getServerAddress()
+ {
+ return address;
+ }
+ public String toString()
+ {
+ return "TestBisocketClientInvoker";
+ }
+ }
+}
\ No newline at end of file
14 years, 9 months