JBoss Remoting SVN: r5441 - remoting2/branches/2.2/src/main/org/jboss/remoting.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 21:48:37 -0400 (Wed, 02 Sep 2009)
New Revision: 5441
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java
Log:
JBREM-1150: Changed test in updateLease() from > to >=.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java 2009-09-02 23:41:45 UTC (rev 5440)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/Lease.java 2009-09-03 01:48:37 UTC (rev 5441)
@@ -109,7 +109,7 @@
String timeString = (String) requestMap.get(LeasePinger.TIME_STAMP);
time = Long.valueOf(timeString).longValue();
if (isTraceEnabled) log.trace(this + " last update: " + lastUpdate + ", this update: " + time);
- if (time > lastUpdate)
+ if (time >= lastUpdate)
{
lastUpdate = time;
doUpdate(requestMap);
15 years, 3 months
JBoss Remoting SVN: r5440 - remoting2/branches/2.2/src/main/org/jboss/remoting/transporter.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 19:41:45 -0400 (Wed, 02 Sep 2009)
New Revision: 5440
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java
Log:
JBREM-1105: Corrected range in call to Random.nextInt().
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java 2009-09-02 23:41:06 UTC (rev 5439)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java 2009-09-02 23:41:45 UTC (rev 5440)
@@ -17,7 +17,7 @@
int size = servers.size();
if (size > 1)
{
- index = new Random().nextInt(size - 1);
+ index = new Random().nextInt(size);
}
}
15 years, 3 months
JBoss Remoting SVN: r5439 - remoting2/branches/2.x/src/main/org/jboss/remoting/transporter.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 19:41:06 -0400 (Wed, 02 Sep 2009)
New Revision: 5439
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java
Log:
JBREM-1105: Corrected range in call to Random.nextInt().
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java 2009-09-02 23:04:08 UTC (rev 5438)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transporter/DefaultLoadBalancer.java 2009-09-02 23:41:06 UTC (rev 5439)
@@ -17,7 +17,7 @@
int size = servers.size();
if (size > 1)
{
- index = new Random().nextInt(size - 1);
+ index = new Random().nextInt(size);
}
}
15 years, 3 months
JBoss Remoting SVN: r5438 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 19:04:08 -0400 (Wed, 02 Sep 2009)
New Revision: 5438
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-1107: Altered previous comment about IdleTimeoutTask behavior.
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-09-02 23:02:47 UTC (rev 5437)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-09-02 23:04:08 UTC (rev 5438)
@@ -1462,8 +1462,8 @@
<para><emphasis role="bold">Note.</emphasis> A server thread that is
engaged in a long invocation when the idle timeout checker is activated
- can be removed from its thread pool and marked for destruction after the
- invocation is complete. The "idleTimeout" value should be configured
+ can be removed from its thread pool and marked for later destruction once
+ the invocation is complete. The "idleTimeout" value should be configured
accordingly.</para>
<para><emphasis role="bold">Note.</emphasis> As of Remoting version 2.4,
15 years, 3 months
JBoss Remoting SVN: r5437 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 19:02:47 -0400 (Wed, 02 Sep 2009)
New Revision: 5437
Modified:
remoting2/branches/2.2/docs/guide/en/chap5.xml
Log:
JBREM-1107: Altered previous comment about IdleTimeoutTask behavior.
Modified: remoting2/branches/2.2/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-09-02 22:59:53 UTC (rev 5436)
+++ remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-09-02 23:02:47 UTC (rev 5437)
@@ -1233,8 +1233,9 @@
invocation. If the idle timeout facility is used, upgrading is strongly
recommended. Note that even with the bug fix, a server thread that is
engaged in a long invocation when the idle timeout checker is activated
- can be marked for destruction after the invocation is complete. The
- "idleTimeout" value should be configured accordingly.</para>
+ can be removed from its thread pool and marked for later destruction once
+ the invocation is complete. The "idleTimeout" value should be configured
+ accordingly.</para>
<para><emphasis role="bold">Note.</emphasis> Prior to release
2.2.2.SP7, if a server thread experienced a
15 years, 3 months
JBoss Remoting SVN: r5436 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 18:59:53 -0400 (Wed, 02 Sep 2009)
New Revision: 5436
Modified:
remoting2/branches/2.x/docs/guide/en/chap5.xml
Log:
JBREM-1107: Added comment about IdleTimeoutTask behavior.
Modified: remoting2/branches/2.x/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-09-02 22:54:56 UTC (rev 5435)
+++ remoting2/branches/2.x/docs/guide/en/chap5.xml 2009-09-02 22:59:53 UTC (rev 5436)
@@ -1460,6 +1460,12 @@
finished processing on a particular socket connection and have been
returned to the thread pool for later reuse. </para>
+ <para><emphasis role="bold">Note.</emphasis> A server thread that is
+ engaged in a long invocation when the idle timeout checker is activated
+ can be removed from its thread pool and marked for destruction after the
+ invocation is complete. The "idleTimeout" value should be configured
+ accordingly.</para>
+
<para><emphasis role="bold">Note.</emphasis> As of Remoting version 2.4,
some changes have been made to
<classname>ServerThread</classname>.</para>
15 years, 3 months
JBoss Remoting SVN: r5435 - remoting2/branches/2.2/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 18:54:56 -0400 (Wed, 02 Sep 2009)
New Revision: 5435
Modified:
remoting2/branches/2.2/docs/guide/en/chap5.xml
Log:
JBREM-1107: Added comment about IdleTimeoutTask bug.
Modified: remoting2/branches/2.2/docs/guide/en/chap5.xml
===================================================================
--- remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-09-02 19:29:31 UTC (rev 5434)
+++ remoting2/branches/2.2/docs/guide/en/chap5.xml 2009-09-02 22:54:56 UTC (rev 5435)
@@ -1228,6 +1228,14 @@
finished processing on a particular socket connection and have been
returned to the thread pool for later reuse. </para>
+ <para><emphasis role="bold">Note.</emphasis> Prior to release 2.2.3.SP1,
+ a bug allowed the termination of server threads in the middle of a long
+ invocation. If the idle timeout facility is used, upgrading is strongly
+ recommended. Note that even with the bug fix, a server thread that is
+ engaged in a long invocation when the idle timeout checker is activated
+ can be marked for destruction after the invocation is complete. The
+ "idleTimeout" value should be configured accordingly.</para>
+
<para><emphasis role="bold">Note.</emphasis> Prior to release
2.2.2.SP7, if a server thread experienced a
<classname>java.net.SocketTimeoutException</classname>, it would return
15 years, 3 months
JBoss Remoting SVN: r5434 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 15:29:31 -0400 (Wed, 02 Sep 2009)
New Revision: 5434
Added:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java
Log:
JBREM-1107: New unit test.
Added: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java (rev 0)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java 2009-09-02 19:29:31 UTC (rev 5434)
@@ -0,0 +1,177 @@
+/*
+ * 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.socket.timeout.idle;
+
+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.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.socket.SocketServerInvoker;
+
+
+/**
+ * Unit test for JBREM-1107.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Sep 2, 2009
+ * </p>
+ */
+public class SafeIdleTimeoutTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(SafeIdleTimeoutTestCase.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.TRACE);
+ 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 testSafeIdleTimeout() 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");
+ clientConfig.put("numberOfCallRetries", "1");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Verify invocation can complete.
+ assertEquals("abc", client.invoke("abc"));
+
+ // Verify ServerThread was discarded.
+ SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
+ assertEquals(0, serverInvoker.getCurrentClientPoolSize());
+ assertEquals(0, serverInvoker.getCurrentThreadPoolSize());
+
+ 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 + "/?&idleTimeout=2";
+ 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();
+ }
+
+
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ log.info(this + " going to sleep");
+ Thread.sleep(10000);
+ log.info(this + " has woken up");
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+}
\ No newline at end of file
15 years, 3 months
JBoss Remoting SVN: r5433 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 15:28:49 -0400 (Wed, 02 Sep 2009)
New Revision: 5433
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java
Log:
JBREM-1107: New unit test.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/socket/timeout/idle/SafeIdleTimeoutTestCase.java 2009-09-02 19:28:49 UTC (rev 5433)
@@ -0,0 +1,177 @@
+/*
+ * 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.socket.timeout.idle;
+
+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.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.socket.SocketServerInvoker;
+
+
+/**
+ * Unit test for JBREM-1107.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version
+ * <p>
+ * Copyright Sep 2, 2009
+ * </p>
+ */
+public class SafeIdleTimeoutTestCase extends TestCase
+{
+ private static Logger log = Logger.getLogger(SafeIdleTimeoutTestCase.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.TRACE);
+ 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 testSafeIdleTimeout() 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");
+ clientConfig.put("numberOfCallRetries", "1");
+ addExtraClientConfig(clientConfig);
+ Client client = new Client(clientLocator, clientConfig);
+ client.connect();
+ log.info("client is connected");
+
+ // Verify invocation can complete.
+ assertEquals("abc", client.invoke("abc"));
+
+ // Verify ServerThread was discarded.
+ SocketServerInvoker serverInvoker = (SocketServerInvoker) connector.getServerInvoker();
+ assertEquals(0, serverInvoker.getCurrentClientPoolSize());
+ assertEquals(0, serverInvoker.getCurrentThreadPoolSize());
+
+ 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 + "/?&idleTimeout=2";
+ 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();
+ }
+
+
+ static class TestInvocationHandler implements ServerInvocationHandler
+ {
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ log.info(this + " going to sleep");
+ Thread.sleep(10000);
+ log.info(this + " has woken up");
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+ }
+}
\ No newline at end of file
15 years, 3 months
JBoss Remoting SVN: r5432 - remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-02 15:28:11 -0400 (Wed, 02 Sep 2009)
New Revision: 5432
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
Log:
JBREM-1107: Fixed IdleTimeoutTask so that it won't kill a ServerThread in the middle of an invocation.
Modified: remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
===================================================================
--- remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2009-09-02 17:23:54 UTC (rev 5431)
+++ remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2009-09-02 19:28:11 UTC (rev 5432)
@@ -798,9 +798,11 @@
{
log.trace("Idle timeout reached for ServerThread (" + svrThread + ") and will be evicted.");
}
- clientpool.remove(svrThread);
+ synchronized (clientpool)
+ {
+ clientpool.remove(svrThread);
+ }
svrThread.shutdown();
- svrThread.unblock();
}
}
}
@@ -845,7 +847,10 @@
{
log.trace("Idle timeout reached for ServerThread (" + svrThread + ") and will be removed from thread pool.");
}
- threadpool.remove(svrThread);
+ synchronized(threadpool)
+ {
+ threadpool.remove(svrThread);
+ }
svrThread.shutdown();
}
}
15 years, 3 months