You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Jar Lyons <jl...@bluescooter.com> on 2002/01/31 01:48:07 UTC

What is the proper way to exit Phoenix when something terrible has gone wrong

:I just changed my application to do a System.exit(..) if a
BindException is thrown during initialization

What I wanted to do was throw a RuntimeException .... or anything that
would reliably bring the system down.

But alas ... it looks like everything upstream gets swallowed ....

This means that if you inadvertently start a server twice .... the
second one will fail on the bind (for obvious reasons)
and then stay running.

Any suggestions other than System.exit?

Jar Lyons


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: What is the proper way to exit Phoenix when something terrible has gone wrong

Posted by Peter Donald <pe...@apache.org>.
On Thu, 31 Jan 2002 11:48, Jar Lyons wrote:
> :I just changed my application to do a System.exit(..) if a
>
> BindException is thrown during initialization
>
> What I wanted to do was throw a RuntimeException .... or anything that
> would reliably bring the system down.
>
> But alas ... it looks like everything upstream gets swallowed ....
>
> This means that if you inadvertently start a server twice .... the
> second one will fail on the bind (for obvious reasons)
> and then stay running.
>
> Any suggestions other than System.exit?

You should now be able to throw an exception during the apps startup either 
from a block or a block listener and the application will be killed. If there 
are now applications left in the kernel then it should go down. Well at least 
I think so ... will test it in a bit :)

BTW This should probably goto the avalon-phoenix-dev@jakarta.apache.org list

-- 
Cheers,

Pete

*---------------------------------------------------------*
| Contrary to popular belief, UNIX is user-friendly. It   |
| just happens to be selective on who it makes friendship |
| with.                                                   |
|                       - Richard Cook                    |
*---------------------------------------------------------*

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: What is the proper way to exit Phoenix when something terrible has gone wrong

Posted by Peter Donald <pe...@apache.org>.
On Thu, 31 Jan 2002 13:06, Peter Royal wrote:
> Sounds like it might be useful for a phoenix instance to automatically shut
> itself down when there are no running SARs.

okay will do - should be a 2 line addition ... done ;)

BTW this should probably be posted to the phoenix list 

-- 
Cheers,

Pete

*----------------------------------------------*
| The best defense against logic is ignorance. |
*----------------------------------------------*

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: What is the proper way to exit Phoenix when something terrible has gone wrong

Posted by Peter Royal <pr...@managingpartners.com>.
On Wednesday 30 January 2002 07:48 pm, Jar Lyons wrote:
> :I just changed my application to do a System.exit(..) if a
>
> BindException is thrown during initialization
>
> What I wanted to do was throw a RuntimeException .... or anything that
> would reliably bring the system down.
>
> But alas ... it looks like everything upstream gets swallowed ....
>
> This means that if you inadvertently start a server twice .... the
> second one will fail on the bind (for obvious reasons)
> and then stay running.
>
> Any suggestions other than System.exit?

Sounds like it might be useful for a phoenix instance to automatically shut 
itself down when there are no running SARs.
-pete

-- 
peter royal -> proyal@managingpartners.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>