activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: How to configure persistence in MySQL
Date Thu, 16 Mar 2006 10:42:51 GMT
This sounds a little odd - could you send the entire XML file you were using
please? Only there were some namespace changes from 3.x to 4.x and I just
want to check that it really is recognising the persistent configuration

James

On 3/16/06, Javier Leyba <xleyba@gmail.com> wrote:
>
> I'm a little bit confused. Let me tell you what I understood and
> please tell me what am I doing wrong.
>
> I want to have a journal persistence for faster performance but that
> could be automatically stored in a MySQL DB.
>
> Then I've defined:
>
> Code:
>
> <persistenceAdapter>
>                          <journaledJDBC journalLogFiles="5"
> dataDirectory="../activemq-data" dataSource="#mysql-ds"
> useJournal="true" useQuickJournal="false">
>                                  <adapter><bytesJDBCAdapter/></adapter>
>                          </journaledJDBC>
>
>      </persistenceAdapter>
>    </broker>
>
>          <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://172.31.112.16/activeMQ?relaxAutoCommit=true"/>
>              <property name="username" value="activeMQ"/>
>              <property name="password" value="activeMQ"/>
>              <property name="poolPreparedStatements" value="true"/>
>      </bean>
>
>
>
>
>
>
> After run some tests creating topics and messages and couldn't see
> tables created or data in my MySQL DB.
>
> Then I decided to test using just a jdbc persistence in my MySQL DB
> then I replaced above code with:
>
> Code:
>
>
> <persistenceAdapter>
>              <jdbcPersistenceAdapter dataSource="#mysql-ds"
> cleanupPeriod="60000">
>                  <adapter><bytesJDBCAdapter/></adapter>
>              </jdbcPersistenceAdapter>
>
>          </persistenceAdapter>
>      </broker>
>
>      <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://172.31.112.16/activeMQ?relaxAutoCommit=true"/>
>              <property name="username" value="activeMQ"/>
>              <property name="password" value="activeMQ"/>
>              <property name="poolPreparedStatements" value="true"/>
>      </bean>
>
>
>
>
>
>
> But when I started broker I saw in console out:
>
>
> Code:
>
>
> INFO  DefaultListableBeanFactory     - Creating shared instance of
> singleton bean 'mysql-ds'
> INFO  BrokerService                  - ActiveMQ 4.0-M4 JMS Message
> Broker (nova1) is starting
> INFO  BrokerService                  - For help or more information
> please see: <a href="http://www.logicblaze.com" target="_blank"
> rel="nofollow">http://www.logicblaze.com</a>
> INFO  JDBCPersistenceAdapter         - Database driver recognized:
> [apache_derby_embedded_jdbc_driver]
> INFO   - Journal Recovery Started from: Active Journal: using 2 x
> 20.0 Megs at: activemq-data/nova1/journal
> INFO  JournalPersistenceAdapter      - Journal Recovered: 0
> message(s) in transactions recovered.
>
>
>
>
>
>
> it's using a JournalPersistenceAdapter !!! ???
>
> I've checked activemq start script and commented the line:
>
> Code:
>
>
> if [ -z "$ACTIVEMQ_OPTS" ] ; then
>    #### ACTIVEMQ_OPTS="-Xmx512M -Dderby.system.home=../data
> -Dderby.storage.fileSyncTransactionLog=true"
>      ACTIVEMQ_OPTS=""
> fi
>
>
>
>
>
>
> Then I started broker againg and saw the same message !!!
>
> Why my broker is using allways JournalPersistenceAdapter and how could
> I get a persistence where data were saved in Journal and MySQL DB ?
>
>
> Thanks in advance
>
> J
>



--

James
-------
http://radio.weblogs.com/0112098/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message