2 Replies Latest reply on Aug 13, 2004 6:53 AM by lbtanjitha

    Creating a permanant queue

    lbtanjitha

      Hi,
      Using the Jmx-console we can create queues at run time, but these are not permanant queues. After creating a queue, there is no permanant entry in the jbossmq-destinations-service.xml file. So if u stop the Jboss server then the added queue no longer exists. Is there any way to create a permanant queue in JbossMQ?

      Is there any Java API exists to create queues at run time? If so what are the java methods to create queues?

      Thnaks in advanced
      Thilina

        • 1. Re: Creating a permanant queue
          genman


          You can create a -service.xml and copy it in during run-time. It does not need to be part of the destionations.xml file. If you are creating queues programmatically (i.e., from a list in a database), use JMX: Get the MBeanServer and call invoke.

          • 2. Re: Creating a permanant queue
            lbtanjitha

            hi,
            Changing the cofiguration file at run time gives the following error.
            I'm using LB queue to store the messages. Changing any configuration file at run time gives errors,


            16:43:15,265 INFO [MessageCache] Stopping jboss.mq:service=MessageCache
            16:43:15,265 INFO [CacheStore] Stopping jboss.mq:service=CacheStore
            16:43:15,265 ERROR [LB] Destroying failed
            javax.jms.JMSException: The destination is being used.
            at org.jboss.mq.server.JMSDestinationManager.closeDestination(JMSDestina
            tionManager.java:807)
            at org.jboss.mq.server.jmx.DestinationMBeanSupport.destroyService(Destin
            ationMBeanSupport.java:142)
            at org.jboss.system.ServiceMBeanSupport.destroy(ServiceMBeanSupport.java
            :284)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
            ler.java:976)
            at $Proxy15.destroy(Unknown Source)
            at org.jboss.system.ServiceController.destroy(ServiceController.java:531
            )
            at org.jboss.system.ServiceController.destroy(ServiceController.java:522
            )
            at org.jboss.system.ServiceController.destroy(ServiceController.java:522
            )
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy4.destroy(Unknown Source)
            at org.jboss.deployment.SARDeployer.destroy(SARDeployer.java:408)
            at org.jboss.deployment.MainDeployer.destroy(MainDeployer.java:522)
            at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:473)
            at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:467)
            at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:440)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy6.undeploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploym
            entScanner.java:332)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
            canner.java:452)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            doScan(AbstractDeploymentScanner.java:201)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            loop(AbstractDeploymentScanner.java:212)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
            run(AbstractDeploymentScanner.java:191)
            16:43:15,296 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
            -3.2.2/server/default/deploy/jms/file-pm-service.xml



            Can u give a suggesion to correct this?

            Thank you.
            thilina