You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Angel Angelov <an...@sayrix.com> on 2004/04/25 22:59:01 UTC

shutdown james

Hi all,
I have 2 questions about shutting down james. I hope somebody can help me.
1) I want to shut down james from my mailet if it don't initialize 
properly. I tried with System.exit(1), but it don't work.
Some suggestion how can I do it?
2) What happens with all opened SMTP connections if I stop james? Is 
james waiting until the connections are closed or it closes the 
connections?
If james closes the connections - how, what message takes the SMTP clients?

Thanks!

Regards,
Angel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: shutdown james

Posted by "Noel J. Bergman" <no...@devtech.com>.
>> 1) I want to shut down james from my mailet if it don't initialize
>> properly. I tried with System.exit(1), but it don't work.
>> Some suggestion how can I do it?

Try throwing a MessagingException from your init method.

>> 2) What happens with all opened SMTP connections if I stop james? Is
>> james waiting until the connections are closed or it closes the
>> connections?
>> If james closes the connections - how, what message takes the SMTP
>> clients?

> Hmmm... I believe James closes all connections straight away, though
> this may have changed.

James closes connections.  It does not wait, for example. for existing DATA
commands to complete.  HOWEVER, James 2.2.0RC2 does have changes in the
spooler.  If there is activity in the spooler, James will let each spool
thread complete processing the message it currently has before shutting down
the spooler.  IIRC, that is the only place where we'll hold up a service for
existing processing before doing a shutdown.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: shutdown james

Posted by Serge Knystautas <se...@lokitech.com>.
Angel Angelov wrote:
>> 1) I want to shut down james from my mailet if it don't initialize 
>> properly. I tried with System.exit(1), but it don't work.
>> Some suggestion how can I do it?

Does James hang, does it continue to run and just not process messages, 
or anything behavior is helpful.  Also, what OS/James version/JDK version?

>> 2) What happens with all opened SMTP connections if I stop james? Is 
>> james waiting until the connections are closed or it closes the 
>> connections?
>> If james closes the connections - how, what message takes the SMTP 
>> clients?

Hmmm... I believe James closes all connections straight away, though 
this may have changed.  SMTP is a very robust protocol so other servers 
will happily retry.  As clients, they would get a disconnect message.

It's actually an interesting matter for the connection pooler... how to 
handle shutdown, and I could see this wanting to be different for 
different installations.  Maybe Noel or someone more up to date on this 
could shine some light on this.

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: shutdown james

Posted by Angel Angelov <an...@sayrix.com>.
Any suggestions on this topic?
Thanks.

--Angel

Angel Angelov wrote:

> Hi all,
> I have 2 questions about shutting down james. I hope somebody can help 
> me.
> 1) I want to shut down james from my mailet if it don't initialize 
> properly. I tried with System.exit(1), but it don't work.
> Some suggestion how can I do it?
> 2) What happens with all opened SMTP connections if I stop james? Is 
> james waiting until the connections are closed or it closes the 
> connections?
> If james closes the connections - how, what message takes the SMTP 
> clients?
>
> Thanks!
>
> Regards,
> Angel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org