Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 74F0F7F04 for ; Mon, 29 Aug 2011 09:00:20 +0000 (UTC) Received: (qmail 9128 invoked by uid 500); 29 Aug 2011 09:00:19 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 8941 invoked by uid 500); 29 Aug 2011 09:00:10 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 8835 invoked by uid 99); 29 Aug 2011 09:00:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2011 09:00:04 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2011 09:00:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 248FFD5300 for ; Mon, 29 Aug 2011 08:59:40 +0000 (UTC) Date: Mon, 29 Aug 2011 08:59:40 +0000 (UTC) From: "Dominik Drzewiecki (JIRA)" To: issues@cxf.apache.org Message-ID: <562790035.2635.1314608380146.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (CXF-3773) CXF unregisters MBeans for JAX-WS endpoints twice MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 CXF unregisters MBeans for JAX-WS endpoints twice ------------------------------------------------- Key: CXF-3773 URL: https://issues.apache.org/jira/browse/CXF-3773 Project: CXF Issue Type: Bug Components: JAX-WS Runtime Affects Versions: 2.4.2 Environment: Tomcat 6.0.33 / Spring 3.0.[56] / Java 1.[67] Reporter: Dominik Drzewiecki MBeans created for JAX-WS endpoints do get unregistered twice during context shutdown. I've placed a breakpoint in {{org.apache.cxf.management.jmx.InstrumentationManagerImpl.unregister(ObjectName)}} and caught following stacks when reaching it. The first line shows the ObjectName being unregistered. You may notice that the first three stacks are observed during the {{CXFBus}} shutdown, and the fourth one during {{JAXWS22SpringEndpointImpl}}. The last invocation of {{org.apache.cxf.management.jmx.InstrumentationManagerImpl.unregister(ObjectName)}} results in {{javax.management.InstanceNotFoundException}} being thrown (the full message is {{"WARNING: Unregistering ManagedEndpoint failed. javax.management.InstanceNotFoundException: org.apache.cxf:bus.id=cxf52615653,type=Bus.Service.Endpoint,service="{http://ws.xxx.xxxxx.com/}Service",port="ServicePort"}}) which prevents from shutting down the endpoint bean, spring context and web application context cleanly. {noformat} org.apache.cxf:bus.id=cxf52615653,type=Bus.Service.Endpoint,service="{http://ws.xxx.xxxxxx.com/}Service",port="ServicePort" Thread [main] (Suspended (entry into method unregister in InstrumentationManagerImpl)) InstrumentationManagerImpl.unregister(ObjectName) line: 229 InstrumentationManagerImpl.unregister(ManagedComponent) line: 225 ServerImpl.destroy() line: 180 ServerRegistryImpl.preShutdown() line: 88 CXFBusLifeCycleManager.preShutdown() line: 84 CXFBusLifeCycleManager.postShutdown() line: 91 SpringBus.onApplicationEvent(ApplicationEvent) line: 94 SimpleApplicationEventMulticaster.multicastEvent(ApplicationEvent) line: 97 XmlWebApplicationContext(AbstractApplicationContext).publishEvent(ApplicationEvent) line: 303 XmlWebApplicationContext(AbstractApplicationContext).doClose() line: 1007 XmlWebApplicationContext(AbstractApplicationContext).close() line: 970 ContextLoaderListener(ContextLoader).closeWebApplicationContext(ServletContext) line: 384 ContextLoaderListener.contextDestroyed(ServletContextEvent) line: 78 StandardContext.listenerStop() line: 4245 StandardContext.stop() line: 4886 StandardHost(ContainerBase).stop() line: 1110 StandardEngine(ContainerBase).stop() line: 1110 StandardEngine.stop() line: 468 StandardService.stop() line: 604 StandardServer.stop() line: 788 Catalina.stop() line: 662 Catalina.start() line: 629 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 601 Bootstrap.start() line: 289 Bootstrap.main(String[]) line: 414 {noformat} {noformat} org.apache.cxf:bus.id=cxf52615653,type=Bus.Service.Endpoint,service="{http://ws.xxx.xxxxx.com/}Service",port="Service" Thread [main] (Suspended (entry into method unregister in InstrumentationManagerImpl)) InstrumentationManagerImpl.unregister(ObjectName) line: 229 InstrumentationManagerImpl.unregister(ManagedComponent) line: 225 ServerImpl.destroy() line: 180 ServerRegistryImpl.preShutdown() line: 88 CXFBusLifeCycleManager.preShutdown() line: 84 CXFBusLifeCycleManager.postShutdown() line: 91 SpringBus.onApplicationEvent(ApplicationEvent) line: 94 SimpleApplicationEventMulticaster.multicastEvent(ApplicationEvent) line: 97 XmlWebApplicationContext(AbstractApplicationContext).publishEvent(ApplicationEvent) line: 303 XmlWebApplicationContext(AbstractApplicationContext).doClose() line: 1007 XmlWebApplicationContext(AbstractApplicationContext).close() line: 970 ContextLoaderListener(ContextLoader).closeWebApplicationContext(ServletContext) line: 384 ContextLoaderListener.contextDestroyed(ServletContextEvent) line: 78 StandardContext.listenerStop() line: 4245 StandardContext.stop() line: 4886 StandardHost(ContainerBase).stop() line: 1110 StandardEngine(ContainerBase).stop() line: 1110 StandardEngine.stop() line: 468 StandardService.stop() line: 604 StandardServer.stop() line: 788 Catalina.stop() line: 662 Catalina.start() line: 629 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 601 Bootstrap.start() line: 289 Bootstrap.main(String[]) line: 414 {noformat} {noformat} org.apache.cxf:bus.id=cxf52615653,type=Bus Thread [main] (Suspended (entry into method unregister in InstrumentationManagerImpl)) InstrumentationManagerImpl.unregister(ObjectName) line: 229 InstrumentationManagerImpl.shutdown() line: 263 InstrumentationManagerImpl.postShutdown() line: 279 CXFBusLifeCycleManager.postShutdown() line: 97 SpringBus.onApplicationEvent(ApplicationEvent) line: 94 SimpleApplicationEventMulticaster.multicastEvent(ApplicationEvent) line: 97 XmlWebApplicationContext(AbstractApplicationContext).publishEvent(ApplicationEvent) line: 303 XmlWebApplicationContext(AbstractApplicationContext).doClose() line: 1007 XmlWebApplicationContext(AbstractApplicationContext).close() line: 970 ContextLoaderListener(ContextLoader).closeWebApplicationContext(ServletContext) line: 384 ContextLoaderListener.contextDestroyed(ServletContextEvent) line: 78 StandardContext.listenerStop() line: 4245 StandardContext.stop() line: 4886 StandardHost(ContainerBase).stop() line: 1110 StandardEngine(ContainerBase).stop() line: 1110 StandardEngine.stop() line: 468 StandardService.stop() line: 604 StandardServer.stop() line: 788 Catalina.stop() line: 662 Catalina.start() line: 629 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 601 Bootstrap.start() line: 289 Bootstrap.main(String[]) line: 414 {noformat} {noformat} org.apache.cxf:bus.id=cxf52615653,type=Bus.Service.Endpoint,service="{http://ws.xxx.xxxxx.com/}Service",port="ServicePort" Thread [main] (Suspended (entry into method unregister in InstrumentationManagerImpl)) InstrumentationManagerImpl.unregister(ObjectName) line: 229 InstrumentationManagerImpl.unregister(ManagedComponent) line: 225 ServerImpl.destroy() line: 180 JAXWS22SpringEndpointImpl(EndpointImpl).stop() line: 263 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 601 DisposableBeanAdapter.invokeCustomDestroyMethod(Method) line: 273 DisposableBeanAdapter.destroy() line: 199 DefaultListableBeanFactory(DefaultSingletonBeanRegistry).destroyBean(String, DisposableBean) line: 487 DefaultListableBeanFactory(DefaultSingletonBeanRegistry).destroySingleton(String) line: 463 DefaultListableBeanFactory(DefaultSingletonBeanRegistry).destroySingletons() line: 431 XmlWebApplicationContext(AbstractApplicationContext).destroyBeans() line: 1048 XmlWebApplicationContext(AbstractApplicationContext).doClose() line: 1022 XmlWebApplicationContext(AbstractApplicationContext).close() line: 970 ContextLoaderListener(ContextLoader).closeWebApplicationContext(ServletContext) line: 384 ContextLoaderListener.contextDestroyed(ServletContextEvent) line: 78 StandardContext.listenerStop() line: 4245 StandardContext.stop() line: 4886 StandardHost(ContainerBase).stop() line: 1110 StandardEngine(ContainerBase).stop() line: 1110 StandardEngine.stop() line: 468 StandardService.stop() line: 604 StandardServer.stop() line: 788 Catalina.stop() line: 662 Catalina.start() line: 629 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 601 Bootstrap.start() line: 289 Bootstrap.main(String[]) line: 414 {noformat} For the completness, my spring context is as simple as: {code:xml} {code} While the class and the interface exposed as a service looks somewhat like this: {code} @WebService(endpointInterface="com.xxxxx.xxx.ws.IService", serviceName="Service" ) @Component("service") public class Service implements IService { // implementation here } {code} {code} @WebService public interface IService { @WebResult(name = "status") @WebMethod(operationName = "send") public boolean send(@WebParam(name = "message") SomeMessage message) throws SomeException; @Oneway @WebMethod(operationName = "doSend") public void doSend(@WebParam(name = "message") SomeMessage message) throws SomeException; } {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira