tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ushakov, Sergey N" <usha...@int.com.ru>
Subject Re: launching Tomcat from Java
Date Tue, 30 Oct 2001 20:28:57 GMT
Thank you Craig, that is something I wanted to hear :)

By the way, I did not dare removing System.exit() myself as I found half a
dozen classes that use this call... Perhaps some of these calls deserve
changing to something else...

Regards,
Sergey


----- Original Message -----
From: "Craig R. McClanahan" <craigmcc@apache.org>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>; "Ushakov, Sergey
N" <ushakov@int.com.ru>
Sent: Tuesday, October 30, 2001 10:24 PM
Subject: Re: launching Tomcat from Java


> The key question is whether you want Tomxcat to run in the same JVM or
> not.  For running in a separate JVM, you're not going to have a lot of
> choice about using Runtime.exec().
>
> To run in the same JVM, Bootstrap.main() currently has a "System.exit(0)"
> at the end which needs to be removed.  I'll make that change in the Tomcat
> code so that this will not be a problem in future versions.
>
> For same-JVM use, you can also consider using the
> org.apache.catalina.startup.Embedded class to set up Tomcat components the
> way you want them.  This is the technique used by the J2EE 1.3 RI to embed
> Tomcat as the web container, and is useful when you want to maintain your
> own configuration information independent of the "server.xml" file.  This
> class has a dummy main() method that illustrates its use.
>
> Craig
>
>
> On Tue, 30 Oct 2001, Ushakov, Sergey N wrote:
>
> > Date: Tue, 30 Oct 2001 11:04:44 +0300
> > From: "Ushakov, Sergey N" <ushakov@int.com.ru>
> > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>,
> >      "Ushakov, Sergey N" <ushakov@int.com.ru>
> > To: tomcat-user@jakarta.apache.org
> > Subject: launching Tomcat from Java
> >
> > Hello,
> >
> > I am writing a java app that is intended as sort of control center. It
> > should also occasionally start and stop Tomcat.
> >
> > Unfortunately I still cannot find a better solution for this than
> > Runtime.exec("...startup...", ...).
> >
> > My attempts to use Bootstrap.main() also give a good result ;)  But only
> > until I wish to stop Tomcat. Then Bootstrap.main ("stop") just kills the
> > whole JVM... :(
> >
> > Still avoiding Runtime.exec() would be great. Any ideas? Any ways to
> > parameterize Catalina/Bootstrap/etc ?
> >
> > Regards,
> > Sergey Ushakov
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message