[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Shutdown of server



Peter Antman wrote:

On 19 Sep, Marcel Ruff wrote:


Could you please add a

Thread.currentThread().dumpStack();

into setExit() to find out who calls it?





Here you have it:

Thanks
The only point i know of where we send an admin command 'exit' is the last
test of our testsuite:

 xmlBlaster/testsuite/src/java/org/xmlBlaster/test/StopXmlBlaster.java

This is needed that when the tests are run from ant, the tests are returning,
to be ready to generate the html reports ...


Does this happen during running the testsuite??
If yes, StopXmlBlaster is called in AllTests.java, we could add a property
to switch it on/off from outside

Marcel


6 PM INFO  RequestBroker-/node/http:80.72.2.80:3412] Administrative exit request, scheduled exit in 2000 millis with exit value=0. 2002-09-19 17:09:56,711 484108 WARN [Default] (Thread-67:) java.lang.Exception: Stack trace 2002-09-19 17:09:56,712 484109 WARN [Default] (Thread-67:) at java.lang.Thread.dumpStack(Thread.java:992) 2002-09-19 17:09:56,712 484109 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.RequestBroker.setExit(RequestBroker.java:1835) 2002-09-19 17:09:56,713 484110 WARN [Default] (Thread-67:) at java.lang.reflect.Method.invoke(Native Method) 2002-09-19 17:09:56,714 484111 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.admin.intern.CoreHandler.setInvoke(CoreHandler.java:255) 2002-09-19 17:09:56,715 484112 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.admin.intern.CoreHandler.setInvoke(CoreHandler.java:287) 2002-09-19 17:09:56,717 484114 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.admin.intern.CoreHandler.set(CoreHandler.java:164) 2002-09-19 17:09:56,718 484115 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.admin.CommandManager.set(CommandManager.java:200) 2002-09-19 17:09:56,719 484116 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.admin.extern.MomClientGateway.setCommand(MomClientGateway.java:130) 2002-09-19 17:09:56,720 484117 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1111) 2002-09-19 17:09:56,721 484118 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1047) 2002-09-19 17:09:56,722 484119 WARN [Default] (Thread-67:) at org.xmlBlaster.engine.XmlBlasterImpl.publish(XmlBlasterImpl.java:138) 2002-09-19 17:09:56,723 484120 WARN [Default] (Thread-67:) at org.xmlBlaster.protocol.corba.ServerImpl.publish(ServerImpl.java:108) 2002-09-19 17:09:56,724 484121 WARN [Default] (Thread-67:) at org.xmlBlaster.protocol.corba.serverIdl.ServerPOA._invoke(ServerPOA.java:80) 2002-09-19 17:09:56,725 484122 WARN [Default] (Thread-67:) at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:207) 2002-09-19 17:09:56,726 484123 WARN [Default] (Thread-67:) at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:404) 2002-09-19 17:09:56,727 484124 WARN [Default] (Thread-67:) at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:513) 2002-09-19 17:09:56,728 484125 DEBUG [Default] (Thread-67:) [Sep 19, 2002 5:09:56 PM INFO  CoreHandler-/node/http:80.72.2.80:3412] Successful invoked set method 'exit' 2002-09-19 17:09:56,730 484127 DEBUG [Default] (Thread-67:) [Sep 19, 2002 5:09:56 PM INFO  CoreHandler-/node/http:80.72.2.80:3412] Set /node/http:80.72.2.80:3412/?exit=0

Some admin command to shut the server down? Is it possible to turn these
of? Or do we need an embedded server that runs another RequestBroker?

//Peter


thanks
Marcel


Peter Antman wrote:



On 19 Sep, Marcel Ruff wrote:




Peter Antman wrote:





Hi,
I would really need an advice here. When running the testsuite agains an
XmlBlaster embedded in JBoss (the EmbeddedXmlBlaster) the whole JBoss
server was suddenly shut down. As far as I can see it was some sort of
runlevel change in XmlBlaster that triggered a System.exit call. Could
that be true. In that case: this is not so good when running XmlBlaster
in an embedded system, since it exits the complete JVM, and with it the
whole server. Any ideas on how to make tge embedded version no call
System.exit, ever! Any way to set the allowed runlevels or something
like that?

//Peter






Is this resolved with your TestGet.java change?

Marcel




Nopp. Maybe this is the problem (from RequestBroker):


} public void setExit(String exitValue) throws XmlBlasterException { int val = 0; try { val = Integer.parseInt(exitValue.trim()); } catch(NumberFormatException e) { log.error(ME, "Invalid exit value=" + exitValue + ", expected an integer"); }; final int exitVal = val; final long exitSleep = 2000L; Timeout timeout = new Timeout("ExitTimer"); Timestamp timeoutHandle = timeout.addTimeoutListener(new I_Timeout() { public void timeout(Object userData) { log.info(ME, "Administrative exit(" + exitVal + ") after exit-timeout of " + exitSleep + " millis."); System.exit(exitVal); } }, exitSleep, null); log.info(ME, "Administrative exit request, scheduled exit in " + exitSleep + " millis with exit value=" + exitVal + "."); }

The log says:

2002-09-19 10:24:45,290 549156 DEBUG [Default] (Thread-65:) [Sep 19, 2002 10:24:45 AM INFO  RequestBroker-/node/http:80.72.2.80:3412] Administrative exit request, scheduled exit in 2000 millis with exit value=0.
2002-09-19 10:24:47,297 551163 DEBUG [Default] (ExitTimer:) [Sep 19, 2002 10:24:47 AM INFO  RequestBroker-/node/http:80.72.2.80:3412] Administrative exit(0) after exit-timeout of 2000 millis.


//Peter