14 Replies Latest reply on Feb 21, 2004 2:24 PM by Thomas Cherel

    JMS implementation concerns

    Halldór Ísak Gylfason Newbie

      I have been looking at the implementation of JMS queues in JBoss 3.0.7 and I have some concerns.

      I am implementing an application that gets a huge number of messages inserted on a JMS queue, reads off the queue and processes the messages.

      It seems strange to me to implement the MessageCache and PersistenceManagers as two seperate modules. If I would be implementing a "special" JMS queue for my application I would have this as one module that simply has some small cache of the messages first on queue, and the rest persisted.

      In the current model all messages get persisted and are then put to the message cache, and if that get's too big it is persisted to a file, so in effect messages are persisted twice.

      This also makes the JBoss startup extremely slow if the queue contains a lot of messages since all messages are read from the persistence manager, are then subsequently put to the Message Cache that ends up persisting the messages again!

      Do you agree with me that this implementation has some shortcomings, or am I missing some important detail?

      Anyway...we found out that we could not use the file-based managers because the operating system could not handle the amount of files. Note that even though the RollingFilePersistanceManager uses a single file for the queue, the MessageCache uses a single file for each message!

      We started using the JDBC2 persistance manager, but found out that it uses the same MessageCache implementation by default. Then I noticed that the JDBC2 PersistanceManager class actually implements the MessageCache interface, so I changed the configuration so that the JDBc2 persistance manager uses itself as a message cache. Is that something that is all right? I haven't seen anything in the JBoss documentation that supports this option?

      Anyway we are slowly building up expirence with JBoss and as we learn more it gets better.

      By the way... I really like the coding style and design of JBoss although I have some doubts concerning the JMS part ;)

      Best Regards

      Halldor Isak Gylfason

        • 1. Re: JMS implementation concerns
          Halldór Ísak Gylfason Newbie

          Oh... what I meant to say is that PersistenceManager implements the CacheStore interface

          • 2. Re: JMS implementation concerns
            Adrian Brock Master

            Yes jdbc2 implements both.

            The message cache knows nothing about the
            flow of messages, or size of messages,
            or whether somebody is actually subscribed
            for those messages.
            This is a shortcoming in the implementation.

            > By the way... I really like the coding style and
            > design of JBoss although I have some doubts
            > concerning the JMS part ;)

            So do we, that is why we will be rewriting it for jboss4

            Regards,
            Adrian

            • 3. Re: JMS implementation concerns
              Stephane Nicoll Master

              I tried to use JDBC as cache store but It's not working. Any clue how to do this?

              Thanks

              • 4. Re: JMS implementation concerns
                Halldór Ísak Gylfason Newbie

                I just set the following line in the jbossmq-service.xml




                • 5. Re: JMS implementation concerns
                  Adrian Brock Master

                  Any clue to what "not working" means?

                  Regards,
                  Adrian

                  • 6. Re: JMS implementation concerns
                    Halldór Ísak Gylfason Newbie

                    I shouldn't have been so quick. In theory the JDBC2 persistance manager implements the CacheStore interface, but I have problems starting it because I get the following error:

                    2003-05-28 12:06:38,359 DEBUG [org.jboss.system.ServiceController] Starting dependent components: [ObjectName: jboss.mq:service=CacheStore
                    state: CREATED
                    I Depend On: jboss.jca:service=LocalTxDS,name=hsqldbDS
                    jboss.jca:service=LocalTxCM,name=hsqldbDS

                    Depends On Me: jboss.mq:service=MessageCache
                    ]
                    2003-05-28 12:06:38,375 INFO [org.jboss.mq.pm.jdbc2.PersistenceManager] Starting
                    2003-05-28 12:06:38,375 ERROR [org.jboss.mq.pm.jdbc2.PersistenceManager] Starting failed
                    javax.management.InstanceNotFoundException: null object name
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:348)
                    at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:413)
                    at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1126)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
                    at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:413)
                    at org.jboss.system.ServiceController.start(ServiceController.java:433)
                    at org.jboss.system.ServiceController.start(ServiceController.java:433)
                    at org.jboss.system.ServiceController.start(ServiceController.java:433)
                    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                    at $Proxy7.start(Unknown Source)
                    at org.jboss.resource.RARDeployer.start(RARDeployer.java:212)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                    at $Proxy3.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
                    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:413)
                    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                    at $Proxy2.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:230)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:325)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
                    at org.jboss.Main.boot(Main.java:148)
                    at org.jboss.Main$1.run(Main.java:381)
                    at java.lang.Thread.run(Thread.java:536)
                    2003-05-28 12:06:38,390 WARN [org.jboss.system.ServiceController] Problem starting service jboss.mq:service=CacheStore
                    javax.management.InstanceNotFoundException: null object name
                    at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:348)
                    at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:413)
                    at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1126)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
                    at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
                    at $Proxy4.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:413)
                    at org.jboss.system.ServiceController.start(ServiceController.java:433)
                    at org.jboss.system.ServiceController.start(ServiceController.java:433)
                    at org.jboss.system.ServiceController.start(ServiceController.java:433)
                    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                    at $Proxy7.start(Unknown Source)
                    at org.jboss.resource.RARDeployer.start(RARDeployer.java:212)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                    at $Proxy3.deploy(Unknown Source)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
                    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
                    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
                    at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
                    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
                    at $Proxy0.start(Unknown Source)
                    at org.jboss.system.ServiceController.start(ServiceController.java:413)
                    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
                    at $Proxy2.start(Unknown Source)
                    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:230)
                    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:575)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                    at java.lang.reflect.Method.invoke(Method.java:324)
                    at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:325)
                    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:222)
                    at org.jboss.Main.boot(Main.java:148)
                    at org.jboss.Main$1.run(Main.java:381)
                    at java.lang.Thread.run(Thread.java:536)

                    When I originally got this I added dependency to the hypersoniq database :


                    <!--
                    | The CacheStore decides where to store JBossMQ message that
                    | that the MessageCache has decided to move in secondary storage.
                    -->

                    <depends optional-attribute-name="DataSource">jboss.jca:service=LocalTxDS,name=hsqldbDS
                    jboss.jca:service=LocalTxCM,name=hsqldbDS


                    but this still comes.

                    Any clues what might be wrong. Seems that he doesn't find the datasource

                    Regards, Halldor

                    • 7. Re: JMS implementation concerns
                      Halldór Ísak Gylfason Newbie

                      Ok ... I am now one step further. I changed the Message Cache to depend directly on the PeristanceManager for CacheStore:


                      20
                      40
                      <depends optional-attribute-name="CacheStore">jboss.mq:service=PersistenceManager




                      <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache
                      <depends optional-attribute-name="DataSource">jboss.jca:service=LocalTxDS,name=DB2DS
                      jboss.jca:service=LocalTxCM,name=DB2DS

                      BLOB_TYPE=BYTES_BLOB
                      INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
                      INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
                      SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
                      SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
                      SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
                      SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
                      MARK_MESSAGE = UPDATE JMS_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
                      DELETE_ALL_MESSAGE_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXID=?
                      DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
                      DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
                      DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
                      CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \
                      DESTINATION VARCHAR(50) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
                      MESSAGEBLOB OBJECT, PRIMARY KEY (MESSAGEID, DESTINATION) )
                      CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER )



                      This still doesn't work, although there are no exceptions. The problems seems to be the circular dependency so JBoss reports a long list of "Mbeans waiting on other MBeans. I appended that list to the message

                      Any clues on how to solve this circular dependency? I thought JBoss could handle that.

                      Regards , Halldor

                      2003-05-28 13:16:44,343 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
                      Cause: Incomplete Deployment listing:
                      Packages waiting for a deployer:

                      Incompletely deployed packages:

                      MBeans waiting for classes:

                      MBeans waiting for other MBeans:
                      [ObjectName: jboss.mq.destination:service=Topic,name=testTopic
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager
                      jboss.mq:service=SecurityManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager
                      jboss.mq:service=SecurityManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager
                      jboss.mq:service=SecurityManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=testQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager
                      jboss.mq:service=SecurityManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=A
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=B
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=C
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=D
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=ex
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=CalidrisQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=CalidrisWarehouseQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=SafeguardQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=TimeEventQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Queue,name=SegmentQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq.destination:service=Topic,name=UpdateCacheQueue
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=JVM
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=Invoker

                      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=RMI
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=Invoker

                      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=OIL
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=Invoker

                      Depends On Me: , ObjectName: jboss.mq:service=InvocationLayer,type=UIL
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=Invoker

                      Depends On Me: , ObjectName: jboss.mq:service=Invoker
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=TracingInterceptor

                      Depends On Me: jboss.mq:service=InvocationLayer,type=JVM
                      jboss.mq:service=InvocationLayer,type=RMI
                      jboss.mq:service=InvocationLayer,type=OIL
                      jboss.mq:service=InvocationLayer,type=UIL
                      , ObjectName: jboss.mq:service=TracingInterceptor
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=SecurityManager

                      Depends On Me: jboss.mq:service=Invoker
                      , ObjectName: jboss.mq:service=SecurityManager
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager

                      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
                      jboss.mq.destination:service=Topic,name=securedTopic
                      jboss.mq.destination:service=Topic,name=testDurableTopic
                      jboss.mq.destination:service=Queue,name=testQueue
                      jboss.mq:service=TracingInterceptor
                      jboss.mq.destination:service=Queue,name=DLQ
                      , ObjectName: jboss.mq:service=DestinationManager
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=PersistenceManager
                      jboss.mq:service=StateManager

                      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
                      jboss.mq.destination:service=Topic,name=securedTopic
                      jboss.mq.destination:service=Topic,name=testDurableTopic
                      jboss.mq.destination:service=Queue,name=testQueue
                      jboss.mq.destination:service=Queue,name=A
                      jboss.mq.destination:service=Queue,name=B
                      jboss.mq.destination:service=Queue,name=C
                      jboss.mq.destination:service=Queue,name=D
                      jboss.mq.destination:service=Queue,name=ex
                      jboss.mq.destination:service=Queue,name=CalidrisQueue
                      jboss.mq.destination:service=Queue,name=CalidrisWarehouseQueue
                      jboss.mq.destination:service=Queue,name=SafeguardQueue
                      jboss.mq.destination:service=Queue,name=TimeEventQueue
                      jboss.mq.destination:service=Queue,name=SegmentQueue
                      jboss.mq.destination:service=Topic,name=UpdateCacheQueue
                      jboss.mq:service=SecurityManager
                      jboss.mq.destination:service=Queue,name=DLQ
                      , ObjectName: jboss.mq:service=MessageCache
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=PersistenceManager

                      Depends On Me: jboss.mq:service=PersistenceManager
                      , ObjectName: jboss.mq:service=PersistenceManager
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=MessageCache
                      jboss.jca:service=LocalTxDS,name=DB2DS
                      jboss.jca:service=LocalTxCM,name=DB2DS

                      Depends On Me: jboss.mq:service=DestinationManager
                      jboss.mq:service=MessageCache
                      , ObjectName: jboss.mq.destination:service=Queue,name=DLQ
                      state: CONFIGURED
                      I Depend On: jboss.mq:service=DestinationManager
                      jboss.mq:service=SecurityManager

                      Depends On Me: ]

                      • 8. Re: JMS implementation concerns
                        Adrian Brock Master

                        Don't use <depends optional-attribute>

                        just use

                        Regards,
                        Adrian

                        • 9. Re: JMS implementation concerns
                          Halldór Ísak Gylfason Newbie

                          Hurray!!!

                          This works!!!

                          Now I'm using DB2 both as cache store and persistance manager.

                          Thanks a lot!

                          Regards. Halldor

                          • 10. Re: JMS implementation concerns
                            Thomas Cherel Novice

                            Just to be sure, with JBoss 3.0.5, when configuring the CacheStore as a org.jboss.mq.pm.jdbc2.PersistenceManager, only the JMS_MESSAGES table is necessary. No need to define any SQL statements for the JMS_TRANSACTIONS table. Right?

                            • 11. Re: JMS implementation concerns
                              Adrian Brock Master

                              Wrong.

                              Use 3.0.7+ or even better 3.2.3
                              The message cache was rewritten and fixed in that version

                              Regards,
                              Adrian

                              • 12. Re: JMS implementation concerns
                                Thomas Cherel Novice

                                The reponse send by Adrian to halldori on may 28 appears cut off throught he web interface:

                                Don't use <depends optional-attribute>

                                just use

                                Regards,
                                Adrian

                                Any ideas on what this response was since I am experiencing the same issue?
                                I do plan to move to 3.2.3 in the near future but I also need to have that "temporarily" working on 3.0.5. Any help will be appreciated.
                                Thanks.

                                Thomas

                                • 13. Re: JMS implementation concerns
                                  Thomas Cherel Novice

                                  I think I finally managed to make it work with JBoss 3.0.5.
                                  You can find enclosed the configuration that I used. The issue I had was related to the MessageCache attribute of the PersistentManager. It cannot be null so I set it up to its own name (not sure if this is the right thing to do, but it seems to work fine so far).
                                  One final question if anyone has the answer: I suppose that I need two separate table spaces for the MessageCache and the persistent JMS messages (what is used by the DestinationManager). I cannot use the same PersistenceManager and/or the same database tables for both the message cache and the persistent JMS messages, can I?

                                   <mbean code="org.jboss.mq.server.MessageCache"
                                   name="jboss.mq:service=MessageCache">
                                   <attribute name="HighMemoryMark">50</attribute>
                                   <attribute name="MaxMemoryMark">60</attribute>
                                   <depends optional-attribute-name="CacheStore">jboss.mq:service=CacheStore</depends>
                                   </mbean>
                                  
                                   <mbean code="org.jboss.mq.pm.jdbc2.PersistenceManager"
                                   name="jboss.mq:service=CacheStore">
                                   <depends optional-attribute-name="DataSource">jboss.jca:service=LocalTxDS,name=mssqldbDS</depends>
                                   <depends>jboss.jca:service=LocalTxCM,name=mssqldbDS</depends>
                                   <attribute name="MessageCache">jboss.mq:service=MessageCache</attribute>
                                   <attribute name="SqlProperties">
                                   BLOB_TYPE=BYTES_BLOB
                                   INSERT_TX = INSERT INTO JMSCACHE_TRANSACTIONS (TXID) values(?)
                                   INSERT_MESSAGE = INSERT INTO JMSCACHE_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
                                   SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMSCACHE_TRANSACTIONS
                                   SELECT_MAX_TX = SELECT MAX(TXID) FROM JMSCACHE_MESSAGES
                                   SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMSCACHE_MESSAGES WHERE DESTINATION=?
                                   SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMSCACHE_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
                                   MARK_MESSAGE = UPDATE JMSCACHE_MESSAGES SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
                                   DELETE_ALL_MESSAGE_WITH_TX = DELETE FROM JMSCACHE_MESSAGES WHERE TXID=?
                                   DELETE_TX = DELETE FROM JMSCACHE_TRANSACTIONS WHERE TXID = ?
                                   DELETE_MARKED_MESSAGES = DELETE FROM JMSCACHE_MESSAGES WHERE TXID=? AND TXOP=?
                                   DELETE_MESSAGE = DELETE FROM JMSCACHE_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
                                   CREATE_MESSAGE_TABLE = CREATE TABLE JMSCACHE_MESSAGES ( MESSAGEID INTEGER NOT NULL, \
                                   DESTINATION VARCHAR(50) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
                                   MESSAGEBLOB IMAGE, PRIMARY KEY (MESSAGEID, DESTINATION) )
                                   CREATE_TX_TABLE = CREATE TABLE JMSCACHE_TRANSACTIONS ( TXID INTEGER )
                                   </attribute>
                                   </mbean>
                                  


                                  • 14. Re: JMS implementation concerns
                                    Thomas Cherel Novice

                                    I guess I spoke a little too quickly.
                                    Sending messages seems to be fine.
                                    Trying to delete messages through the JMX console is throwing an exception (see below).
                                    It seems to throw this exception only when the cache starts to be used (if messages are only stored in the persistent storage since they are persistent messages, it is ok. It is only when messages start to be stored in both the cache and the persistent storage than the error occurs).

                                    java.lang.NullPointerException
                                     at org.jboss.mq.server.MessageReference.getHeaders(MessageReference.java:116)
                                     at org.jboss.mq.server.BasicQueue.dropMessage(BasicQueue.java:430)
                                     at org.jboss.mq.server.BasicQueue.removeAllMessages(BasicQueue.java:262)
                                     at org.jboss.mq.server.JMSQueue.removeAllMessages(JMSQueue.java:149)
                                     at org.jboss.mq.server.jmx.Queue.removeAllMessages(Queue.java:82)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                     at java.lang.reflect.Method.invoke(Method.java:324)
                                     at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
                                     at org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:227)
                                     at org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:196)
                                     at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:183)
                                     at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:78)
                                     at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:60)
                                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                                     at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
                                     at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
                                     at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
                                     at org.mortbay.http.HttpContext.handle(HttpContext.java:1656)
                                     at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
                                     at org.mortbay.http.HttpContext.handle(HttpContext.java:1606)
                                     at org.mortbay.http.HttpServer.service(HttpServer.java:862)
                                     at org.jboss.jetty.Jetty.service(Jetty.java:497)
                                     at org.mortbay.http.HttpConnection.service(HttpConnection.java:752)
                                     at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:916)
                                     at org.mortbay.http.HttpConnection.handle(HttpConnection.java:769)
                                     at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
                                     at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
                                     at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)