Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-311

Can't configure ActiveMQ to use jdbc persistence

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • JBoss A-MQ 6.1
    • JBoss A-MQ 6.0
    • None
    • None

    Description

      I'm trying to configure ActiveMQ with jdbc adapter but ClassNotFoundException is thrown.

      Caused by: java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource not found by org.apache.activemq.activemq-osgi

      Configuration:

       
          <broker ... >
      ...
              <persistenceAdapter>
                  <jdbcPersistenceAdapter dataDirectory="${data}" dataSource="#mysql-ds"/>
              </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://localhost/activemq?relaxAutoCommit=true"/>
               <property name="username" value="activemq"/>
               <property name="password" value="activemq"/>
               <property name="maxActive" value="200"/>
               <property name="poolPreparedStatements" value="true"/>
           </bean>
      

      Can you document how to configure it? How load BasicDataSource class before activemq-osgi and also where put JDBC Driver class?

      Attachments

        Activity

          People

            fbolton@redhat.com Fintan Bolton (Inactive)
            robert@balent.cz Robert Balent (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: