How do you propose to handle status while the server is starting or stopping? How many states would be returned? Would this also be exposed over JMX?

How would it really differ from the deployer list-modules command we already have? Maybe that command needs to return better rc/status/message when the server is still starting/stopping or not started?


-Donald


Jack Cai wrote:
I've seen users asking how to query server status [1], and recently I was also asked for the same question by a colleague. So I think maybe it's good that Geronimo provide a cross-platform means for querying server status. After looking into the code that does server shutdown, I realize it's pretty easy to achieve that. All I need to do is to -

1. Refactor the org.apache.geronimo.deployment.cli.StopServer class to something more general, e.g., ServerControl. We can make it to do status query or shutdown based on an extra parameter that's passed in, or make it a super class and create another 2 subclasses to do status query and shutdown respectively.

2. Add a new command to the geronimo.(sh/bat) script, e.g., "status". And based on how Step 1 is done, we can either reuse the shutdown.jar (probably rename it to control.jar); or create a new status.jar just to do status query, and leave the shutdown.jar to do the shutdown.

3. The code that does the real status query work will be as simply as "serverControl.getRunningKernel().isRunning()".

I prefer to reuse the shutdown.jar. If you see no problem with my current thinking, I'll go ahead to create a JIRA with a patch.

-Jack

[1] http://www.nabble.com/status-from-shell-script-(System-V-starup)-td20472233s134.html

Reply via email to