tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjorn Danielsson <bjorn-apa...@lists.cuspycode.com>
Subject Re: JMS and peristent messages
Date Thu, 22 Sep 2011 12:00:32 GMT
Markus Lutum <Markus.Lutum@nedap.com> wrote:
>
> I have a question how I can get a JMS Message persistent in the Database.
>
> I am using the following configuration:
> (default I think)
>[...]
> <Resource id="My JMS Resource Adapter" type="ActiveMQResourceAdapter">
>   # Broker configuration URI as defined by ActiveMQ
>   # see http://activemq.apache.org/broker-configuration-uri.html
>   #BrokerXmlConfig xbean:file:conf/activemq.xml
>   BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false&amp;persistent=true
>[...]

I looked into this since I also want persistant JMS. I found that
there is some code in BrokerServer.java (openejb-3.1.x branch)
which intercepts a "broker:" URI and runs some special code in
that case. Not sure exactly what the code does, but it stops JMS
persistence from working.

I found that if you let the BrokerXmlConfig property be an
empty string, then ActiveMQ will use its default configuration
which persists JMS messages by logging them in a KahaDB database
under the directory "activemq-data" which is automatically
created when ActiveMQ is initialized.

You don't get JDBC persistence unless ActiveMQ is explicitly
configured for that. I guess an "xbean:" URI is needed for
that, but I haven't tried this myself.

-- 
Bjorn Danielsson
Cuspy Code AB

Mime
View raw message