[jboss-dev-forums] [Design of EJB 3.0] - Re: EJBTHREE-1396 MockServer must report startup / shutdown
wolfc
do-not-reply at jboss.com
Thu Nov 6 02:37:19 EST 2008
"ALRubinger" wrote : * In MockServerMonitor.waitForServerStartup(), there's a "while not started" loop. Let's throw a Thread.sleep(100) or something in there as to relax the CPU a bit
|
| * RemoteAccessTestCase now has "mockServerMonitor.waitForServerStartup();", which will block indefinitely - what if server does not start? Recommend making a "private volatile boolean remoteServerStarted" field, spawning off the check to "waitForServerStartup" into a j.u.c.FutureTask, and then call "getResult()" on it with a sensible timeout value. The FutureTask's job would be to set the "remoteServerStarted" to true, and then the RemoteAccessTestCase can poll for that. In the case of a timeout of the FutureTask, throw an exception and fail the test
This has nothing to do with CPU, it's a blocking I/O case.
Use NIO or Remoting 3 here.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187195#4187195
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187195
More information about the jboss-dev-forums
mailing list