8 Replies Latest reply on Aug 16, 2002 9:04 AM by cyates

    Turning off Persistence on a queue


      I have a queue defined in jboss.jcml which I do NOT want persisted in the JBOSS_HOME/db/jbossmq/ directory. How can I turn off persistence for this one queue?

      Using JBoss-2.4.4


        • 1. Re: Turning off Persistence on a queue

          AFAIK you can't.

          You could try coding your own "Persistence Manager" that never stores messages on disk; it wouldn't be too hard to do. Have a look at the org.jboss.mq.pm.* source code.

          • 2. Re: Turning off Persistence on a queue

            There is no org.jboss.pm.mq.* in Jboss 2.4.4, all the Persistence classes are in org.jboss.ejb.

            I took a quick crack at it, by creating a MyPersistenceManager which implements StatefulSessionPersistenceManager, leaving all methods blank so that it would do nothing, and put it in the jboss.xml configuration file but it didn't seem to do anything.

            So now I have to delve into it further. Is the persistence manager for MessageDrivenBeans managed by the ContainerFactory? Should a Message Beans PersistenceManager implemnet the StatefulSessionPersistenceManager or something else? Is it even configurable? Could someone point me in the direction or clarify where Message Beans are managed?


            • 3. Re: Turning off Persistence on a queue

              Hey, what are you talking about.

              - Persistence in JMS is managed by the JMS provider, i.e org.jboss.mq

              - An MDB is a simple JMS client and does not handle persistence at all.


              • 4. Re: Turning off Persistence on a queue

                Can the JMS provider be configured or managed in anyway such that it does NOT write the queue to disk? We're taking a large hit in our apps performance. In addition, if the app server goes down, I don't want it to pickup from the persisted queue, so I have to delete those files before each startup.

                I do no have access to any of the org.jboss.mq.* classes to poke around in. I am using 2.4.4.

                • 5. Re: Turning off Persistence on a queue

                  Are really messages sent as non persistent persisted?

                  JBossMQ is in the jbossmq module. Check out the Branch_2_4
                  or simmilar.


                  • 6. Re: Turning off Persistence on a queue

                    It is using the rolling persistence manager. This takes 79 milliseconds to queue each message. I see four options for persistence managers: rolling, file, jdbc, and logged. I need none, as in no persistence whatsoever, only an in-memory queue if I can do it.

                    Both the jboss.jcml and the jboss.xml files allow for the declaration of a Persistence Manager. Does the jboss.xml's <container-configuration> <persistence-manager> actually override the config in jboss.jcml on a per message driven bean basis? Or do message driven beans just ignore the <persistence-manager> tags?

                    Can I define or NOT USE a persistence manager for a particular queue (and can this be configured in the jboss.jcml file?

                    • 7. Re: Turning off Persistence on a queue

                      Did you know that message persistence is assigned at the message level??? By default JBossMQ makes messages persistent. If you do not want messages to get persisted by a persitence manager, just have the client send non-persistent messages to the queue.
                      One way to do that is by using the QueueSender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);