1 Reply Latest reply on Jul 18, 2013 9:37 PM by Guifang Zhou

    Met hang when trying to add one JMS topic programmatically via JMX in JBoss 7.1.1 Final

    Guifang Zhou Newbie

      Hi,

           I am migrating our application from JBoss 4.2.2 to JBoss 7.1.1 Final. And before we were using JMX APIs of HornetQ (we integrated it by ourselves) to create/remove JMS topics programmatically. After investigation I am trying to use following JMX APIs to do the same thing. The code is run in one SAR (included in one EAR).

       

                ObjectName admin = new ObjectName("jboss.as:subsystem=messaging,hornetq-server=default");

                MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();

                mbeanServer.invoke(admin_, "addJmsTopic",

                          new Object[] { topicName, new String[] { topicName } },

                          new String[] { "java.lang.String", "[Ljava.lang.String;" });

       

      But I met hang during this invocation. It seems the thread is going to acquire one container monitor lock and it does not get it. It is waiting. The thread dump is as following. The whole thread dump file and JBoss log file are attached.

       

      "MSC service thread 1-1" prio=6 tid=0x3376e800 nid=0x75c8 in Object.wait() [0x3397e000]

         java.lang.Thread.State: WAITING (on object monitor)

                at java.lang.Object.wait(Native Method)

                - waiting on <0x0d9da1b8> (a org.jboss.as.controller.ContainerStateMonitor)

                at java.lang.Object.wait(Object.java:503)

                at org.jboss.as.controller.ContainerStateMonitor.await(ContainerStateMonitor.java:153)

                - locked <0x0d9da1b8> (a org.jboss.as.controller.ContainerStateMonitor)

                at org.jboss.as.controller.ModelControllerImpl.awaitContainerMonitor(ModelControllerImpl.java:428)

                at org.jboss.as.controller.OperationContextImpl.awaitContainerMonitor(OperationContextImpl.java:373)

                at org.jboss.as.controller.OperationContextImpl.getServiceTarget(OperationContextImpl.java:340)

                at org.jboss.as.messaging.jms.JMSTopicAdd.performRuntime(JMSTopicAdd.java:82)

                at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:50)

                at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385)

                at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272)

                at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200)

                at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:466)

                at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385)

                at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272)

                at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200)

                at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121)

                at org.jboss.as.jmx.model.ModelControllerMBeanHelper.execute(ModelControllerMBeanHelper.java:390)

                at org.jboss.as.jmx.model.ModelControllerMBeanHelper.invoke(ModelControllerMBeanHelper.java:368)

                at org.jboss.as.jmx.model.ModelControllerMBeanHelper.invoke(ModelControllerMBeanHelper.java:340)

                at org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.invoke(ModelControllerMBeanServerPlugin.java:108)

                at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)

                at com.vitria.feedserver.impl.JBossJMSFeedLifecycleHandler.deployDest(JBossJMSFeedLifecycleHandler.java:85)

                at com.vitria.feedserver.impl.AbstractJMSFeedLifecycleHandler.deployFeed(AbstractJMSFeedLifecycleHandler.java:41)

                at com.vitria.feedserver.impl.FeedManager.deployFeed(FeedManager.java:233)

                at com.vitria.feedserver.impl.FeedManager.doRegisterFeed(FeedManager.java:248)

                at com.vitria.feedserver.impl.FeedManager.start(FeedManager.java:51)

                at com.vitria.feedserver.impl.FeedServerImpl.start(FeedServerImpl.java:94)

                at com.vitria.feedserver.impl.FeedServerImpl.start(FeedServerImpl.java:80)

                - locked <0x13dd0a20> (a com.vitria.feedserver.impl.FeedServerImpl)

                at com.vitria.component.server.ApplicationBootstrap.startFeedServer(ApplicationBootstrap.java:204)

                at com.vitria.component.server.ApplicationBootstrap.postStart(ApplicationBootstrap.java:507)

                at com.vitria.engine.beans.ComponentBootstrap.postStart(ComponentBootstrap.java:17)

                at com.vitria.engine.jbossservice.M3OServerApplicationStartupService.start(Unknown Source)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:606)

                at org.jboss.as.service.AbstractService.invokeLifecycleMethod(AbstractService.java:52)

                at org.jboss.as.service.StartStopService.start(StartStopService.java:54)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                at java.lang.Thread.run(Thread.java:724)

       

       

         Locked ownable synchronizers:

                - <0x0d758ea8> (a java.util.concurrent.ThreadPoolExecutor$Worker)

                - <0x0d9f59b8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)