OK, after spending a considerable amount of time crawling through Tomcat's
Bootstrap and Catalina classes. I have narrowed the problem down I believe.
It seems that the Bootstrap.stop() method is capable of stopping all of the
threads except for one named "http-8080...". When the Bootstrap.start() is
subsequently invoked an exception is throw when the start() method attempts
to load the class loaders again. The only remnant of Tomcat left at that
point is the lone thread I mentioned above. In looking at the class for the
thread "org.apache.tomcat.util.threads.ThreadWithAttributes" there does not
appear to be a way to bring the thread down gracefully. In tracking down the
actual source, it extends Thread which usually means there is a concrete
"run()" method...not in this case. So, tomcat must be using a technique I'm
not familiar with to satisfy the "run()" requirement. 

It seems from looking at the code that tomcat attempts to allow a restart of
sorts but, to my un-enlightened eye it looks like the implementation is not
quite there to fully support that notion. So, it looks like once you start a
tomcat instance within a JVM you are for the most part stuck with it unless
you want to terminate the entire JVM and restart the application. I'm not
sure that is a good long term solution but, it is the best I can do I think
at this point. 

If anyone has any insights please don't hesitate to share. 

Fran 




Fran Varin wrote:
> 
> 
> I took a look at the source for Tomcat 6 and the "// FIXME" remains in the
> "destroy" method within "Bootstrap" as well. 
> 
> The lack of documentation around this part of Tomcat's API is not helping
> much here either. So, it begs the question is what I've coded sufficient
> to start and stop Tomcat from a Java class sufficient or am I missing
> something?
> 
> Any help would be greatly appreciated. 
> 
> Fran 
> 

-- 
View this message in context: 
http://www.nabble.com/Bootstrap-stop%28%29-tf3296281.html#a9198023
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to