1
package org.jboss.test.remoting.transport.socket.timeout.idle;
3
import org.apache.log4j.Logger;
4
import org.jboss.jrunit.extensions.ServerTestCase;
5
import org.jboss.remoting.InvokerLocator;
6
import org.jboss.remoting.transport.Connector;
9
* @author <a href="mailto:telrod@e2technologies.net">Tom Elrod</a>
11
public class IdleTimeoutTestServer extends ServerTestCase
13
private Connector connector;
15
private Logger logger = Logger.getRootLogger();
17
protected String getTransport()
22
public static void main(String[] args) throws Throwable
24
IdleTimeoutTestServer rt = new IdleTimeoutTestServer();
28
public void setUp() throws Exception
33
public void tearDown() throws Exception
42
public void startServer() throws Exception
44
// String locatorURI = "socket://localhost:54000/?maxPoolSize=2&timeout=60000&backlog=0";
45
String locatorURI = getTransport() + "://localhost:54000/?maxPoolSize=2&backlog=0&timeout=60000&idleTimeout=5";
46
InvokerLocator locator = new InvokerLocator(locatorURI);
48
connector = new Connector();
50
connector.setInvokerLocator(locator.getLocatorURI());
53
SampleInvocationHandler invocationHandler = new SampleInvocationHandler();
54
connector.addInvocationHandler("sample", invocationHandler);