activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emh <michael-ha...@gmx.de>
Subject Re: Messages are not getting persisted in database table.(jdbcPersistenceAdapter>
Date Wed, 19 Dec 2007 15:32:03 GMT

Hi,

Does anyone have a solution for that problem? I am currently facing the
problem too, except that I am working with ActiveMQ and a MySQL database.
The tables are being created but they stay empty all the time. If I insert
messages in a queue and restart the broker, the queued messages are lost.
Does anybody know how to configure ActiveMQ that the database tables are
actually used?

Thanks, emh

This is the configuration I use; its quite similar to the configuration from
navneek:
<persistenceAdapter>
        <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.base}/activemq-data" dataSource="#mysql-ds"
useDatabaseLock="false"/>
    </persistenceAdapter>

<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
value="jdbc:mysql://localhost/activemq?createDatabaseIfNotExist=true&amp;relaxAutoCommit=true"/>
    <property name="username" value="username"/>
    <property name="password" value="password"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>


navneek wrote:
> 
> Hi,
> 
> Im using the following configuration for persisting messages into oracle
> database. Ultimately When I start activemq the tables (activemq_acks,
> activemq_lock, activemq_msgs) are created but it is not holding any
> message in table named 'activemq_msgs'. When I post messages into Broker,
> msg staying in broker only... but msg are not going into dadabase
> table(activemq_msgs).Table data remains empty.. Please let me know if im
> missing anymore configuration. I want to populate this table with the
> messages im posting in broker.
> 

-- 
View this message in context: http://www.nabble.com/Messages-are-not-getting-persisted-in-database-table.%28jdbcPersistenceAdapter%3E-tp13404857s2354p14418955.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message