activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Etienne Carouy" <etienne.car...@market-ip.com>
Subject MySQL Persisitence problem with 4.0
Date Thu, 13 Apr 2006 16:07:45 GMT
Hi,

 

I have a problem with the mysql persistence in activeMQ 4.0. It works fine
with 3.2.2 when I use this config file : 

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC  "-//ACTIVEMQ//DTD//EN"
"http://activemq.org/dtd/activemq.dtd">

<beans>

  <broker  >

    <connector>

      <tcpServerTransport uri="tcp://localhost:61616" backlog="1000"
useAsyncSend="true" maxOutstandingMessages="50"/>

    </connector>

    <persistence>

      <cachePersistence>

        <journalPersistence directory="../var/journal">

          <jdbcPersistence dataSourceRef="mysql-ds"/>

        </journalPersistence>

      </cachePersistence>

    </persistence>

  </broker>

  <bean id="derby-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">

    <property name="driverClassName">

      <value>org.apache.derby.jdbc.EmbeddedDriver</value>

    </property>

    <property name="url">

      <value>jdbc:derby:derbydb;create=true</value>

    </property>

    <property name="username">

      <value></value>

    </property>

    <property name="password">

      <value></value>

    </property>

    <property name="poolPreparedStatements">

      <value>true</value>

    </property>

  </bean>

  <bean id="mysql-ds"

        class="org.apache.commons.dbcp.BasicDataSource"

        destroy-method="close">

    <property name="driverClassName">

      <value>com.mysql.jdbc.Driver</value>

    </property>

    <property name="url">

      <value>jdbc:mysql://localhost/activemq?relaxAutoCommit=true</value>

    </property>

    <property name="username">

      <value>activemq</value>

    </property>

    <property name="password">

      <value>activemq</value>

    </property>

    <property name="poolPreparedStatements">

      <value>true</value>

    </property>

  </bean>

</beans>

 

 

 

I translate it into activeMQ4.0 and add some properties:

 

 

<beans xmlns="http://activemq.org/config/1.0">

  <broker brokerName="test" persistent="true" useJmx="true">

    <destinationPolicy>

      <policyMap><policyEntries>

        

          <policyEntry topic="COM.ESBWEVADA>">

            <dispatchPolicy>

              <strictOrderDispatchPolicy />

            </dispatchPolicy>

            <subscriptionRecoveryPolicy>

              <lastImageSubscriptionRecoveryPolicy />

            </subscriptionRecoveryPolicy>

          </policyEntry>

 

      </policyEntries></policyMap>

    </destinationPolicy>

    

    <persistenceAdapter>

      <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"
dataSource="#mysql-ds" >

            <adapter><bytesJDBCAdapter/></adapter>

      </journaledJDBC>

    </persistenceAdapter>

  

    <transportConnectors>

       <transportConnector name="default" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>

       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>

    </transportConnectors>

    

    <networkConnectors>

      <networkConnector name="default" uri="multicast://default"/>

    </networkConnectors>

    

  </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://localhost/activemq?relaxAutoCommit=true"/>

    <property name="username" value="activemq"/>

    <property name="password" value="activemq"/>

    <property name="poolPreparedStatements" value="true"/>

  </bean>

</beans>

 

I've sent some messages to the topic but nothing is saved into database. I
have tried RC2 and a snapshot but I still have same behaviour.

 

Thanks for your answer

 

Etienne


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