You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2011/11/14 20:34:00 UTC

[DAEMON] Documentation of StopClass etc

On 14 November 2011 18:31, sebb <se...@gmail.com> wrote:
> On 4 November 2011 13:22, sebb <se...@gmail.com> wrote:
>> On 4 November 2011 12:52,  <mt...@apache.org> wrote:
>>> Author: mturk
>>> Date: Fri Nov  4 12:52:08 2011
>>> New Revision: 1197541
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1197541&view=rev
>>> Log:
>>> Make a code a bit safer on invalid parameters. Make sure it doesn't crash at least
>>
>> The default --StartClass is now "Main", and --StopClass defaults to
>> "java/lang/System" - in which case the default --StopMethod is "exit"
>> - is that correct?
>>
>> If so, I can update the docs accordingly.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [DAEMON] Documentation of StopClass etc

Posted by Mladen Truk <mt...@apache.org>.
On 11/15/2011 12:50 PM, sebb wrote:
> On 15 November 2011 06:25, Mladen Truk<mt...@apache.org>  wrote:
>
> In which case, why not insist that the StopClass is provided, rather
> than defaulting it?
>
> Or, default to "Main" as is done for StartClass?
>

Yes, that make sense.

Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [DAEMON] Documentation of StopClass etc

Posted by Mladen Truk <mt...@apache.org>.
On 11/15/2011 01:43 PM, Gary Gregory wrote:
> And using system exit in a stop class gives you an error, can't recall
> which one (109?). On my phone ATM, can't check.

I fixed that in the trunk, so should work.
Anyhow, this presumes client has some sort of shutdown hook installed
that will cleanup the process.
But like said, last resort, and should be avoided (at least for production)

Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [DAEMON] Documentation of StopClass etc

Posted by Gary Gregory <ga...@gmail.com>.
And using system exit in a stop class gives you an error, can't recall
which one (109?). On my phone ATM, can't check.

Gary

On Nov 15, 2011, at 6:51, sebb <se...@gmail.com> wrote:

> On 15 November 2011 06:25, Mladen Truk <mt...@apache.org> wrote:
>> On 11/14/2011 08:34 PM, sebb wrote:
>>>
>>> On 14 November 2011 18:31, sebb<se...@gmail.com>  wrote:
>>>>>
>>>>> The default --StartClass is now "Main", and --StopClass defaults to
>>>>> "java/lang/System" - in which case the default --StopMethod is "exit"
>>>>> - is that correct?
>>>>>
>>>>> If so, I can update the docs accordingly.
>>>
>>
>> Updated docs.
>> However I'm still not sure about using System.exit in general.
>> This should be used as "last resort" option.
>
> In which case, why not insist that the StopClass is provided, rather
> than defaulting it?
>
> Or, default to "Main" as is done for StartClass?
>
> If anyone wants to use System.exit() they can do so explicitly.
>
>> Regards
>> --
>> ^TM
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [DAEMON] Documentation of StopClass etc

Posted by sebb <se...@gmail.com>.
On 15 November 2011 06:25, Mladen Truk <mt...@apache.org> wrote:
> On 11/14/2011 08:34 PM, sebb wrote:
>>
>> On 14 November 2011 18:31, sebb<se...@gmail.com>  wrote:
>>>>
>>>> The default --StartClass is now "Main", and --StopClass defaults to
>>>> "java/lang/System" - in which case the default --StopMethod is "exit"
>>>> - is that correct?
>>>>
>>>> If so, I can update the docs accordingly.
>>
>
> Updated docs.
> However I'm still not sure about using System.exit in general.
> This should be used as "last resort" option.

In which case, why not insist that the StopClass is provided, rather
than defaulting it?

Or, default to "Main" as is done for StartClass?

If anyone wants to use System.exit() they can do so explicitly.

> Regards
> --
> ^TM
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [DAEMON] Documentation of StopClass etc

Posted by Mladen Truk <mt...@apache.org>.
On 11/14/2011 08:34 PM, sebb wrote:
> On 14 November 2011 18:31, sebb<se...@gmail.com>  wrote:
>>>
>>> The default --StartClass is now "Main", and --StopClass defaults to
>>> "java/lang/System" - in which case the default --StopMethod is "exit"
>>> - is that correct?
>>>
>>> If so, I can update the docs accordingly.
>

Updated docs.
However I'm still not sure about using System.exit in general.
This should be used as "last resort" option.

Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org