<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Process Manager
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/kabir.khan%40jboss.com">Kabir Khan</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/557357#557357">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><blockquote class="jive-quote"><p>Brian Stansberry wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>David Lloyd wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Might be easier to use specific exit values: 0 means shut down on purpose, anything else means crash?</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>That certainly seems simpler. <span> :) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>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.&#160; Also the same respawn logic has to apply; otherwise a poorly-placed System.exit(0) can bog down the system with fork/execs.</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>+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.</p></blockquote><p><span>I have handled exit code = 0 to not respawn in </span><a class="jive-link-external-small" href="http://github.com/kabir/jboss-as/commit/8862da78064ca95b5ff8d2e866e38093e2a12294" target="_blank">http://github.com/kabir/jboss-as/commit/8862da78064ca95b5ff8d2e866e38093e2a12294</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'll look at notifying the SM next week when I get to implementing the SM&lt;-&gt;Server protocol.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/557357#557357">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>