1 Reply Latest reply on Apr 26, 2008 4:55 AM by Tim Fox

    Simple Queue into a Clustered enviroment

    William Anez Newbie

      Hi all,

      I have a little problem doing a simple destination deployment into my jboss cluster (2 nodes), i need a way to create and erase queues from the cluster (i know about the master node and the queues), i want to create a simple xml file to manage (trought copy and delete) the queues availables in X moment in the farm directory of my cluster.

      In my first approach i use a file like this one:

      < server>
      < mbean name="jboss.mq.destination:service=Queue,name=Foo" code="org.jboss.mq.server.jmx.Queue">
      < depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
      < depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager
      < attribute name="MessageCounterHistoryDayLimit">-1
      < security>
      < role name="quest" write="true" read="true"/>
      < role name="publisher" create="false" write="true" read="true"/>
      < role name="noacc" create="false" write="false" read="false"/>
      < /security>
      < /mbean>
      < /server>

      But that does not work because the DestinationManager is not available in all nodes, only in the master (make sense).

      So, after spend many hours looking for info in google and the internet i modify my file to this:

      < server>
      < loader-repository>jboss.messaging:loader=ScopedLoaderRepository
      < loader-repository-config>java2ParentDelegation=false</loader-repository-config>
      < /loader-repository>

      < mbean code="org.jboss.mq.server.jmx.Queue"
      name="jboss.messaging.destination:service=Queue,name=mimappCQ">

      < depends>jboss.mq:service=PersistenceManager
      < /mbean>
      < /server>


      But this file fails too with this error:

      2008-04-25 12:21:41,072 WARN [org.jboss.system.ServiceController] Problem creating service jboss.messaging.destination:service=Queue,name=mimappCQ
      java.lang.IllegalArgumentException: null object name
      at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:509)
      at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:550)
      at org.jboss.mq.server.jmx.DestinationMBeanSupport.createService(DestinationMBeanSupport.java:126)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy0.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:330)
      at org.jboss.system.ServiceController.create(ServiceController.java:273)
      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy4.create(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy65.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.ha.framework.server.FarmMemberService.deploy(FarmMemberService.java:412)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      2008-04-25 12:21:41,079 INFO [org.jboss.ha.framework.server.ClusterFileTransfer] Start push of file mimappCQ-service.xml to cluster.
      2008-04-25 12:21:41,080 INFO [org.jboss.ha.framework.server.ClusterFileTransfer] Finished push of file mimappCQ-service.xml to cluster.
      2008-04-25 12:21:41,080 ERROR [org.jboss.ha.framework.server.FarmMemberService] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.messaging.destination:service=Queue,name=mimappCQ
      State: FAILED
      Reason: java.lang.IllegalArgumentException: null object name
      I Depend On:
      jboss.mq:service=PersistenceManager

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.messaging.destination:service=Queue,name=mimappCQ
      State: FAILED
      Reason: java.lang.IllegalArgumentException: null object name
      I Depend On:
      jboss.mq:service=PersistenceManager


      I really need help with this, i dont finally understand how to handle my problem, and anytime i look for documentation and other post etc.. i dont get information exactly refer to my problem and my version of JBoss, every line i write into my xml file is and advice from other person or document who has a different version of jboss and usually a different problem at all..

      BTW, im running JBoss 4.2.2.

      Thx for the help and excuse my english ;)