Author: ron.sigal(a)jboss.com
Date: 2008-04-24 00:26:07 -0400 (Thu, 24 Apr 2008)
New Revision: 4052
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestClient.java
Log:
JBREM-930: Make multiple attempts to connect JNDIDetector to JNDI.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestClient.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestClient.java 2008-04-24
04:16:56 UTC (rev 4051)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/detection/jndi/RestartTestClient.java 2008-04-24
04:26:07 UTC (rev 4052)
@@ -94,11 +94,24 @@
detector.setURLPackage(urlPackage);
server.registerMBean(detector, new
ObjectName("remoting:type=JNDIDetector"));
- detector.start();
- log.info("JNDIDetector has been created and is listening for new
NetworkRegistries to come online");
+
+ for (int i = 0; i < 5; i++)
+ {
+ try
+ {
+ detector.start();
+ log.info("JNDIDetector has been created and is listening for new
NetworkRegistries to come online");
+ break;
+ }
+ catch (Exception e)
+ {
+ log.info("unable to connect to JDNI: will try again");
+ Thread.sleep(2000);
+ }
+ }
}
+
-
public void tearDown() throws Exception
{
detector.stop();
Show replies by date