Messaging Subsystem is stopping to early on server shutdown
joba01 Jul 29, 2013 4:11 AMHi all,
I just ported our application from JBoss 7.1.1 to JBoss 7.2 and sill have several Issues.
1.) When the server is stopped the messaging subsystem is stopped before the shutdown of the application is completed.
We have a Livecyle for performing several tasks/checks on startup and shutdown, on JB7.1.1 the subsystem was shutting down after the application was stopped.
Is there a possibility to configure a dependency to the subsystem org.jboss.as.messaging in my application for a safe shutdown?
See Log, queues are unbound while the application is still stopping:
16:57:27,709 INFO [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003077: Coyote HTTP/1.1 stopping on : http-/0.0.0.0:8180
16:57:27,715 INFO [org.apache.catalina.core] (MSC service thread 1-5) JBWEB001079: Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/] has not been started
16:57:27,740 INFO [org.jboss.jaxr] (MSC service thread 1-8) JBAS014002: UnBinding JAXR ConnectionFactory: java:jboss/jaxr/ConnectionFactory
16:57:27,745 INFO [org.jboss.as.webservices] (MSC service thread 1-8) JBAS015540: Stopping service jboss.ws.port-component-link
16:57:27,759 INFO [org.jboss.web] (ServerService Thread Pool – 121) JBAS018224: Unregister web context: /RemoteTunnelWs
16:57:27,760 INFO [org.jboss.web] (ServerService Thread Pool – 120) JBAS018224: Unregister web context: /app_vision_connector_web
16:57:27,774 INFO [org.jboss.as.messaging] (ServerService Thread Pool – 104) JBAS011605: Unbound messaging object to jndi name java:jboss/exported/jms/queue/host_items
16:57:27,776 INFO [org.jboss.web] (ServerService Thread Pool – 136) JBAS018224: Unregister web context: /VisualizationServiceBeanService
16:57:27,778 INFO [org.jboss.web] (ServerService Thread Pool – 134) JBAS018224: Unregister web context: /core.web
16:57:27,783 INFO [org.jboss.web] (ServerService Thread Pool – 122) JBAS018224: Unregister web context: /app_system_startup_hook
16:57:27,777 INFO [core.infrastructure.application.service.impl.ServiceRegistry] (ServerService Thread Pool – 133) Stopping all services
16:57:27,794 INFO [org.jboss.as.messaging] (ServerService Thread Pool – 104) JBAS011605: Unbound messaging object to jndi name java:/queue/host_items
16:57:27,808 INFO [core.infrastructure.application.service.impl.ServiceRegistry] (ServerService Thread Pool – 133) Stopping service='StartupService'.
16:57:27,808 INFO [connector.startup.gateway.AbstractClientGateway] (ServerService Thread Pool – 133) Gateway on 0.0.0.0/0.0.0.0:6912 receives shutdown signal.
16:57:27,809 INFO [connector.gateway.ClientGateway] (Thread-157) gateway on 0.0.0.0/0.0.0.0:6912 stopped
16:57:27,816 INFO [core.systemStartupHook.listener.AppStartupListener] (ServerService Thread Pool – 122) contextDestroyed
16:57:28,111 INFO [core.infrastructure.system.timer.impl.TimerController] (EJB default - 2) Timer controller stopped.
16:57:28,111 INFO [core.infrastructure.system.startup.impl.SystemCore] (EJB default - 2) Async timer controller startup completed.
16:57:28,596 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 9) JBAS014134: EJB Invocation failed on component TimerExecutor for method public abstract void ...
2.) On startup we are using the MBeanServer for getting the Management Port programmatically for pausing/clearing queues etc.
see code snipped:
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
ObjectName http = new ObjectName("jboss.as:socket-binding-group=standard-sockets,socket-binding=management-native");
jbossManagementPort = (Integer) mBeanServer.getAttribute(http, "boundPort");
On JBoss 7.2 startup the server is not available (in case the application is deployed to a already running server it works fine), in JBoss 7.1.1 the MBeanServer was already available on startup
Is there a possibility for configuring a dependency to that?
Error on JB7.2:
10:04:57,868 WARN [core.infrastructure.system.queue.JBossQueueAPI] (ServerService Thread Pool -- 71) Couldn't determine JBoss 7 management port automatically
10:04:57,869 INFO [core.infrastructure.system.startup.impl.RunLevelManager] (ServerService Thread Pool -- 71) Entering runlevel: ERROR
10:04:57,869 ERROR [core.infrastructure.system.startup.impl.SystemCore] (ServerService Thread Pool -- 71) Failed to start services.: java.lang.RuntimeException: javax.management.InstanceNotFoundException: jboss.as:socket-binding-group=standard-sockets,socket-binding=management-native
at core.util.lang.ExceptionUtil.wrap(ExceptionUtil.java:51) [core.util.jar:]
at core.infrastructure.system.queue.JBossQueueAPI.getJBoss7ManagementPort(JBossQueueAPI.java:489) [core.infrastructure.jar:]
at core.infrastructure.system.queue.JBossQueueAPI.getCachedJBossManagementPort(JBossQueueAPI.java:469) [core.infrastructure.jar:]
at core.infrastructure.system.queue.JBossQueueAPI.executeRequest(JBossQueueAPI.java:214) [core.infrastructure.jar:]
at core.infrastructure.system.queue.JBossQueueAPI.getQueues(JBossQueueAPI.java:197) [core.infrastructure.jar:]
at core.infrastructure.system.queue.JBossQueueAPI.resumeAllQueues(JBossQueueAPI.java:61) [core.infrastructure.jar:]
at core.infrastructure.system.startup.impl.SystemCore.switchFromInitializedToReady(SystemCore.java:247) [core.infrastructure.jar:]
at core.infrastructure.system.startup.impl.SystemCore.startTheSystem(SystemCore.java:123) [core.infrastructure.jar:]
at core.infrastructure.system.startup.impl.SystemStartup.triggerAppStarted(SystemStartup.java:331) [core.infrastructure.jar:]
at core.infrastructure.system.startup.impl.SystemStartup.start(SystemStartup.java:165) [core.infrastructure.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_09]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_09]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09]
at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:115) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:115) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ee.component.ManagedReferenceInterceptorFactory$ManagedReferenceInterceptor.processInvocation(ManagedReferenceInterceptorFactory.java:95) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:248) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:344) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.tx.LifecycleCMTTxInterceptor.processInvocation(LifecycleCMTTxInterceptor.java:66) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.component.singleton.SingletonComponent.getComponentInstance(SingletonComponent.java:126) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ejb3.component.singleton.SingletonComponent.start(SingletonComponent.java:141) [jboss-as-ejb3-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_09]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_09]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_09]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.management.InstanceNotFoundException: jboss.as:socket-binding-group=standard-sockets,socket-binding=management-native
at org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegate(PluggableMBeanServerImpl.java:94)
at org.jboss.as.jmx.PluggableMBeanServerImpl.getAttribute(PluggableMBeanServerImpl.java:171)
at core.infrastructure.system.queue.JBossQueueAPI.getJBoss7ManagementPort(JBossQueueAPI.java:482) [core.infrastructure.jar:]
... 49 more
hope that anybody can help
cheers Johannes