Author: ron.sigal(a)jboss.com
Date: 2008-06-27 21:35:55 -0400 (Fri, 27 Jun 2008)
New Revision: 4332
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java
Log:
JBREM-1005: Uses reflection to call Timer.purge().
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java 2008-06-28
01:32:55 UTC (rev 4331)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketClientInvoker.java 2008-06-28
01:35:55 UTC (rev 4332)
@@ -24,6 +24,7 @@
import java.io.IOException;
import java.io.OutputStream;
+import java.lang.reflect.Method;
import java.net.Socket;
import java.util.Collections;
import java.util.HashMap;
@@ -624,7 +625,15 @@
controlOutputStream = null;
}
cancel();
- timer.purge();
+ try
+ {
+ Method purge = Timer.class.getDeclaredMethod("purge", new
Class[]{});
+ purge.invoke(timer, new Object[]{});
+ }
+ catch (Exception e)
+ {
+ log.debug("running with jdk 1.4: unable to purge Timer");
+ }
}
public void run()
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java 2008-06-28
01:32:55 UTC (rev 4331)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java 2008-06-28
01:35:55 UTC (rev 4332)
@@ -25,6 +25,7 @@
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
+import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
@@ -956,7 +957,15 @@
listenerIdToInvokerLocatorMap = null;
controlConnectionThreadMap = null;
cancel();
- timer.purge();
+ try
+ {
+ Method purge = Timer.class.getDeclaredMethod("purge", new
Class[]{});
+ purge.invoke(timer, new Object[]{});
+ }
+ catch (Exception e)
+ {
+ log.debug("running with jdk 1.4: unable to purge Timer");
+ }
}
public void run()