0 Replies Latest reply on Nov 23, 2004 1:42 PM by nzmalik

    Multiple instances of DestinationManager, PersistenceManager

    nzmalik

      I am attempting to setup a new DestinationManager, PersistenceManager, and MessageCache to allow me to handle persistence of different queues in the same JBoss server differently.

      I need to be able to setup some queues as non-persistent AND setup the cache such that if a message was going to be cached/persisted that it should be dropped from memory instead. I have implemented all classes that I need to successfully do this (I haven't tested it yet), but am unable to get queues to use this new DestinationManager successfully if the standard jboss.mq:service=DestinationManager exists. I have changed that service to point to my new service and it works if it is the only DestinationManager, etc. in existance.

      Is it possible to have a second one setup? Because, if so, I cannot figure out how to configure it successfully. Here's my new null-persistence-service.xml (basically):

      <?xml version="1.0" encoding="UTF-8"?>
      
      <server>
      
       <mbean code="org.jboss.mq.pm.none.PersistenceManager"
       name="MyCompany.mq:service=PersistenceManager">
       </mbean>
      
       <mbean code="com.MyCompany.mq.pm.CacheStore"
       name="MyCompany.mq:service=CacheStore">
       </mbean>
      
       <mbean code="org.jboss.mq.server.MessageCache"
       name="jboss.mq:service=MessageCache">
       <attribute name="HighMemoryMark">50</attribute>
       <attribute name="MaxMemoryMark">60</attribute>
       <attribute name="CacheStore">MyCompany.mq:service=CacheStore</attribute>
       </mbean>
      
       <mbean code="org.jboss.mq.server.jmx.DestinationManager"
       name="MyCompany.mq:service=DestinationManager">
       <depends optional-attribute-name="MessageCache">MyCompany.mq:service=MessageCache</depends>
       <depends optional-attribute-name="PersistenceManager">MyCompany.mq:service=PersistenceManager</depends>
       <depends optional-attribute-name="StateManager">jboss.mq:service=StateManager</depends>
       </mbean>
      
      </server>
      


      And the service containing my queue:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <server>
      
       <mbean code="org.jboss.mq.server.jmx.Queue"
       name="jboss.mq.destination:service=Queue,name=MyQueue">
       <depends optional-attribute-name="DestinationManager">MyCompany.mq:service=DestinationManager</depends>
       </mbean>
      
      </server>
      


      Thanks for the help.