JBoss Community

Process Manager

reply from Kabir Khan in JBoss AS7 Development - View the full discussion

Brian Stansberry wrote:

 

David Lloyd wrote:

 

Might be easier to use specific exit values: 0 means shut down on purpose, anything else means crash?

 

That certainly seems simpler. :)

 

Either way the SM should be notified if a Server exits, regardless of the cause: if the server is not configured to be shut down but it returns 0, the SM needs to kick it back alive again.  Also the same respawn logic has to apply; otherwise a poorly-placed System.exit(0) can bog down the system with fork/execs.

 

+1 on notifying the SM and the restart rules. Whether the SM should automatically restart the server following getting a signal that one shut down cleanly, I'm not so sure. The signal should imply some human action was taken to cause the shutdown, and if that's the case I think requiring human action to restart makes sense. The SM should squawk in the logs though if the shutdown happens via something other than the intended managment API.

I have handled exit code = 0 to not respawn in http://github.com/kabir/jboss-as/commit/8862da78064ca95b5ff8d2e866e38093e2a12294

 

I'll look at notifying the SM next week when I get to implementing the SM<->Server protocol.

 

I have made a start on socket-base PM-process communication but should probably hold off until some consensus on if we want that is reached?

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community