activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Pik <tom...@gmail.com>
Subject Embedding AcitveMQ with JDBC persistence
Date Wed, 15 Apr 2009 06:40:14 GMT
Hello,

I'm trying to embed activemq in web application, using JDBC for persistence.
During startup tables in database are created but activemq is still using
kaha files for persistence.
Here's my config file:

<bean id="dataSource" name="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
...
</bean>

<amq:jdbcPersistenceAdapter id="persistenceAdapter"
useDatabaseLock="false" dataSource="#dataSource"/>
<bean class="org.apache.activemq.store.PersistenceAdapterFactoryBean"/>

<amq:broker useJmx="false" persistent="false"
persistenceAdapter="#persistenceAdapter">
  <amq:transportConnectors>
    <amq:transportConnector uri="vm://alamakota" />
  </amq:transportConnectors>
</amq:broker>

<amq:connectionFactory id="jmsFactory" brokerURL="vm://alamakota"/>
<amq:queue id="jmsQueue" physicalName="alama"/>

What should I do to get rid of 'activemq-data' directory (on
production serwer I won't be able
to write to filesystem) and use database for persistence.

Thanks in advance,
Tomek

Mime
View raw message