You probably want to call setDaemon(true) on the connector(s) that you are using. This should be the default for the CoyoteConnector, but I don't remember what it is for the legacy connectors.
"Slava Risenberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all! > I'm developing an application which embeds Tomcat. There is a management > Java process which never ends and executes a Tomcat on request and shuts > him down. > I have a problem with Tomcat shutdown, it leaves a threads after overall > shutdown, these threads marked as "TP-Processor" with number appended to > it's name. > One important issue to remeber - I cannot use System.exit() call, which is > restricted by custom security manager. So, I need to get the same state of > Tomcat after shutdown, as it was before (clean state). When I try to start > the Tomcat again I get NullPointerException in LogSetter, probably due to > living threads... And when I run the Tomcat for the first time, it starts > successfully. > The code I'm using to start Tomcat is: > context = embededTomcat.addContext( > "path", > new File(rootWEB + "path").toURL(), > null); > embededTomcat.execute(); > > on shutdown I execute the following: > ContextManager contextManager = > embededTomcat.getContextManager(); > contextManager.removeContext(context); > context.shutdown(); > embededTomcat.shutdown(); > > I tried to debug the problem and I found that one of ThreadPool objects > still to be locked by "wait" command, ThreadPool class, line 616 > Any ideas? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]