Byron Nevins wrote:
> The only way you won't see the V3 process running after a failed
> startup is if the JVM itself flames out. E.g.
>
> asadmin start-domain --debug
> asadmin start-domain --debug <flames out -- Debugger won't allow 2
> processes to use the same port>
>
> If you, say, add garbage to domain.xml, then no modules will be loaded
> or running BUT the process will be running. IMHO this ought to be a
> fatal error with a clean process exit.
> start-domain will eventually report that the domain failed to start
> but the process will be running forever until you manually kill it
> (stop-domain can't reach it).
This kind of reminds me of the old tag line for some chain of auto shops
that did brake work:
If you can't stop, don't start.
>
> ----------------------------------------------------------------------
>
> What 'asadmin start-domain' does is this:
>
> start the domain
> Send a "version" command to the admin port for that domain. When a
> response is given -- the domain is started.
> (There is no "are you running" API, so this is what I dreamed up
> before for the meantime)
>
> Note that if you start the same domain twice -- both start-domain
> calls will report success. The second start will report success
> instantly. That's because we are contacting a port -- not a process
>
> ------------------------
>
> Right now we have defined successful start as the ability to handle
> request/response of remote admin commands.
>
> A simple addition to asadmin would prevent the same domain from be
> started more than once -- asadmin simply runs the "version" command
> BEFORE trying to start a domain. If a response is received it would
> fail out.
> This would be a fine solution for asadmin in any case to make it more
> robust. But the onus ought to be on V3 itself. V3 should be aware
> that it is already running and refuse to launch another copy of itself.
I think the plugin team has to agree with Byron on this... (in part
since we have to bypass asadmin)
Having a clear definition of 'start-up successful' that USERS can
understand and agree with is pretty important.
The current situation does not meet user expectations.
vbk