[jboss-user] [Beginners Corner] - Re: How can I find out from command line if JBoss is current

PeterJ do-not-reply at jboss.com
Fri Apr 11 15:45:57 EDT 2008

That is the expected response if the server is not running. Twiddle connects to the jbossas server and queries an bean and returns a response. Thus, if the server is running, you get


But if jbossas is not running, twiddle cannot connect to the server and thus you get an exception. It is impossible to get "Started=false".

If yoo need a "yes" or "no" response, you need to wrap twiddle within a script that examines the response and then replies with yes or no.

My caveat was more about the timing window. In other words, what do you mean by "if JBoss is crrently running"? Here is a hypothetical timeline for starting jbossas:

1 - not yet running
2 - you enter run.bat, and java.exe starts
3 - various services are initialized
4 - JNDI port is opened and JMX is usable
5 - more services and applications start up
6 - ready to accept outside input (e.g. HTTP requests)

By "jbossas is running", do you mean states 2-6, or just state 6?  Either way, the "twiddle" solution yields a incorrect result for a certain period of time. For example, if "jbossas is running" means state 6, them you have a false positive all during states 4 and 5. The question is, can you live with that timing window?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143529#4143529

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143529

More information about the jboss-user mailing list