You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by DA <di...@pramati.com> on 2008/05/01 14:50:23 UTC
message persistance using existing data source
hi
I am using activemq5.0 with jboss4.2.2.i want to persist the messages, i
configured jbdcPersistance in my broker xml file. Now the problem is that
for persisting the messages i have to provide the DataSource. if i do a
lookup for exists datasource which i created for my application, it is not
finding it. Even if create a data source in my broker xml file tables are
getting created but data is not getting populated in it. Table are always
empty.
is there a way where i can use already created datasoure for activemq also
with tables getting populated properly.
This is my broker-config file.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.org/config/1.0"
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.org/config/1.0
http://activemq.apache.org/schema/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd" >
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<amq:broker useJmx="true" brokerName="XYZ">
<amq:managementContext> <!-- we'll use an existing one (JBoss) instead of
creating one -->
<amq:managementContext createConnector="false" connectorPort="1099"
jmxDomainName="org.apache.activemq"/>
</amq:managementContext>
<amq:destinationPolicy>
<amq:policyMap><amq:policyEntries>
<amq:policyEntry topic="FOO.>">
<amq:dispatchPolicy>
<amq:strictOrderDispatchPolicy />
</amq:dispatchPolicy>
<amq:subscriptionRecoveryPolicy>
<amq:lastImageSubscriptionRecoveryPolicy />
</amq:subscriptionRecoveryPolicy>
</amq:policyEntry>
</amq:policyEntries></amq:policyMap>
</amq:destinationPolicy>
<amq:persistenceAdapter>
<amq:jdbcPersistenceAdapter dataSource="#oracle-ds">
</amq:jdbcPersistenceAdapter>
</amq:persistenceAdapter>
<amq:transportConnectors>
<!-- prefixing a connector with discovery: causes the connector to be
advertiesed over rendezvous -->
<amq:transportConnector brokerName="XYZ" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
</amq:transportConnectors>
<amq:networkConnectors>
<!-- by default just auto discover the other brokers -->
<amq:networkConnector brokerName="XYZ" uri="multicast://default"/>
<!--
<networkConnector
uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-->
</amq:networkConnectors>
</amq:broker>
<bean id="oracle-ds" class="oracle.jdbc.xa.client.OracleXADataSource"
destroy-method="close">
<property name="URL" value="jdbc:oracle:thin:@localhost:1521:xe"/>
<property name="user" value="XYZ"/>
<property name="password" value="XYZ"/>
</bean>
<!--
<bean id="my-ds" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="MyDataSource" />
</bean>
-->
Thanks in advance
DA
--
View this message in context: http://www.nabble.com/message-persistance-using-existing-data-source-tp16993233s2354p16993233.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.