tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DJohn...@desknetinc.com
Subject Re: Queries on Embedded Tomcat Server
Date Wed, 01 Dec 2004 19:41:16 GMT
My guess is that when running Tomcat embedded within your application, 
Tomcat provides no non-daemon Threads.  The JVM will shut down when the 
last non-daemon Thread exits, so when your Main method completes, the JVM 
shuts down.  This makes sense, when you consider that embedding Tomcat in 
an application implies that the application is up and running also. 

If your simple class is only for testing purposes, then you may want to 
sleep long enough to do your testing, or read from the console, so it will 
be "alive" waiting on console input, until you respond, which puts the 
timeframe under your control.  If this simple class is your whole 
application, then I'd suggest you run Tomcat standalone. 



Please respond to "Tomcat Users List" <tomcat-user@jakarta.apache.org>
To:     Tomcat Users List <tomcat-user@jakarta.apache.org>
cc: 
Subject:        Re: Queries on Embedded Tomcat Server



Hi,

Even when I dont do a appLoader.stopTomcat();, it goes down and is no
longer accessible.

Thanks,
Mohamed Rafi S



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message