activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gstanden <>
Subject Re: Oracle XE
Date Fri, 22 Oct 2010 16:45:07 GMT

Hi, I know this thread is really stale but I'm working on hooking up ActiveMQ
5.4.1 to Oracle AQ 11gR2 and I've been searching hardscrabble all over the
place for the scarce info on how to do this.

However, in the process I learned things relevant to this old post, and I'd
like to add them here in case this helps someone who is trying to set up
Oracle DB as the persistence store (i.e  ACTIVEMQ_MSGS table in the Oracle
db, etc.).

First, here is my working activemq.xml file which successfully connected and
built my persistence tables in Oracle (i.e. I can send messages from the
ActiveMQ web admin console which always go to my ACTIVEMQ_MSGS table in
Oracle - and no matter what you specific for destination queue, they all end
up in this one table).

--- Begin activemq.xml file for Oracle DB message persistence ---


    <!-- Allows us to use system properties as variables in this
configuration file -->
      <property name="locations">

    <!-- The <broker> element is used to configure the ActiveMQ broker. -->
    <broker useJmx="false" brokerName="jdbcBroker"
             <policyEntry topic=">" producerFlowControl="true"
                <vmCursor />
             <policyEntry queue=">" producerFlowControl="true"
      <managementContext createConnector="false"/>

      <jdbcPersistenceAdapter dataDirectory="${activemq.base}/data"
      <transportConnector name="default" uri="tcp://"/>
      <transportConnector name="openwire" uri="tcp://"/>

    <import resource="jetty.xml"/>
<!-- Oracle DataSource Sample Setup -->
    <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
      <property name="driverClassName"
      <property name="url" value="jdbc:oracle:thin:@centos1:1521:FOG2"/>
      <property name="username" value="mgwadm"/>
      <property name="password" value="mgwadm"/>
      <property name="maxActive" value="200"/>
      <property name="poolPreparedStatements" value="true"/>

--- End activemq.xml file for Oracle DB message persistence ---

Also, fyi, my camel.xml is the default vanilla camel.xml that came with
ActiveMQ 5.4.1.

One other thing - this thread mentioned how send from the webadmin was going
to ACTIVEMQ_MSGS table in Oracle,  but "ant producer" messages weren't
getting into the table.  I wondered about this too for some time.  What I
did to get "ant producer" messages into Oracle was simply to realize that I
had to edit "build.xml" in the activemq/example/build.xml and change
durable=true.  Now you should see them persist in the Oracle db table.

Similarly, when you send from the web admin interface, be sure to check the
persist radio button.

An old thread, I know - sorry.  But I just wanted to make this info
available to anyone else who is pulling their hair out and losing their mind
trying to hook up activemq to oracle peristence and to Oracle AQ.

HTH, Gil

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message