Can you try adding a destroy method to your subclass that does:

public void destroy() {
   super.destroy();
   getBus().shutdown(true);
}

and seeing if that helps?

I'm not seeing a Bus shutdown at all in the non-spring servlet cases and that 
does seem to be a concern.  In theory, that should release a bunch of things 
that may be locking things.   If that works, definitely submit a bug/patch.

Dan



On Wednesday, September 14, 2011 2:48:33 PM Gary Johnson wrote:
> Hello All,
> 
> I'm developing a RESTful web service using CXFNonSpringJaxrsServlet and
> a user.model defined in web.xml.
> All development so far has been within eclipse and going well, except
> when it comes time to shutdown Tomcat.
> When the [Stop Server] button is pressed in the Servers view the
> messages in the Tomcat Console (see below)
> are display followed by a Terminate Server popup with the message:
> 
>                 Server Apache Tomcatv7.0.20 at localhost is not
> responding.
> Do you want to Terminate this server?                  [OK] [Cancel]
> 
> Pressing [OK] stops Tomcat. After looking at the
> CXFNonSpringJaxrsServlet.init(...) code, the last thing it does
> is call JAXRSServerFactoryBean bean.create(). It appears there needs to
> be a way to save the Server from the
> bean.create() so bean.stop() or bean.destroy() can be called in the
> CXFNonSpringJaxrsServlet destroy() method.
> 
> I tried extending CXFNonSpringJaxrsServlet and override the destroy()
> method, but could not find a way to
> access the bean created in init(). Would someone tell me how this can be
> done or is there a totally
> different way to shutdown the server?...Thanks, Gary
> ________________________________
> 
> ***** Tomcat Console Excerpt *****
> 
> Sep 12, 2011 8:11:37 PM org.apache.catalina.core.StandardService
> stopInternal
> INFO: Stopping service Catalina
> 
> Sep 12, 2011 8:11:37 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/RhoRandWebServices] appears to have
> started a thread named
> [qtp26625789-12 Acceptor0 SelectChannelConnector@localhost:9080
> STARTING]
> but has failed to stop it. This is very likely to create a memory leak.
> 
> Sep 12, 2011 8:11:37 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/RhoRandWebServices] appears to have
> started a thread named
> [qtp26625789-13 Selector0 SelectChannelConnector@localhost:9080 STARTED]
> but has failed to stop it. This is very likely to create a memory leak.
> 
> Sep 12, 2011 8:11:37 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/RhoRandWebServices] appears to have
> started a thread named
> [qtp26625789-14] but has failed to stop it. This is very likely to
> create a memory leak.
> 
> ... plus about 10 more identical to this last message, but with
> different [qtp...] thread names.
> ________________________________
> 
> This is similar to
> http://cxf.547215.n5.nabble.com/Threads-warnings-while-undeploying-web-a
> pplication-td3289034.html.
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to