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 --- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> <!-- Allows us to use system properties as variables in this configuration file --> <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <value>file:${activemq.base}/conf/credentials.properties</value> </property> </bean> <!-- The <broker> element is used to configure the ActiveMQ broker. --> <broker useJmx="false" brokerName="jdbcBroker" xmlns="http://activemq.apache.org/schema/core"> <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb"> <pendingSubscriberPolicy> <vmCursor /> </pendingSubscriberPolicy> </policyEntry> <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb"> </policyEntry> </policyEntries> </policyMap> </destinationPolicy> <managementContext> <managementContext createConnector="false"/> </managementContext> <persistenceAdapter> <jdbcPersistenceAdapter dataDirectory="${activemq.base}/data" dataSource="#oracle-ds"/> </persistenceAdapter> <transportConnectors> <transportConnector name="default" uri="tcp://0.0.0.0:61616"/> </transportConnectors> <!-- <transportConnectors> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/> </transportConnectors> --> </broker> <import resource="jetty.xml"/> <!-- Oracle DataSource Sample Setup --> <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <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"/> </bean> </beans> --- 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: http://activemq.2283324.n4.nabble.com/Oracle-XE-tp2346166p3007522.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.