tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Central.Sun.COM>
Subject Re: Question: how to stop when RMI registry not available ?
Date Wed, 09 Feb 2000 00:12:29 GMT

> 
> 
> > I am embedding tomcat in a Java application in order to provide HTTP-based
> > manageability for the application.
> > 
> > When trying to stop the embedded webserver on the application I am embedding
> > tomcat in, I cannot take advantage of using the RMI registry for the
> > administrative port, since the registry is used by the application itself.
> > 
> > I am trying to find a way to perform a tomcat shutdown without stopping
> > the application itself.
> > 
> > If I invoke the HttpServer.stop() method directly, my application
> > terminates.
> 
> Perusal of the code indicates that shutting down the HttpServer triggers
> a ContextManager.stop(), that includes a 'System.exit(0)' call.
> 
> Does not this harm the ability to embed tomcat ?
> 
> Is this the intended behavior ?

Commenting out the System.exit(0) statement in ContextManager effectively
prevents the program from exiting.

However, what the behavior shows is that a ContextManager.stop() does not
release all the resources.

The TCP/IP Endpoint is still bound to the port originally allocated,
preventing me from doing a 'live restart'.

Any ideas of what is missing to be able to send the system to its 'prior to
webserver startup' state ?

Arieh
--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message