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

MySQL 5.7 setup workaround needed to define Adapter

XMLWordPrintable

      There is a needed workaround for setting up JDBC adapter in activemq.xml in order to make connection work "out of the box".

      2019-12-11 12:28:53,322 | INFO  | AMQ-1-thread-1   | JDBCPersistenceAdapter           | tore.jdbc.JDBCPersistenceAdapter  478 | 162 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630423 | Database adapter driver override not found for : [mysql_connector_j].  Will use default implementation.
      

      One has to perform following updates (commented out):

       <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="jdbc-ds">
          <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
          <property name="url" value="jdbc:mysql://<host>:3306/<schema>?user=<user>&amp;password=<pass>"/>
          <property name="maxActive" value="200"/>
          <property name="poolPreparedStatements" value="true"/>
        </bean>
      
      <!--      <bean id="mysql" class="org.apache.activemq.store.jdbc.adapter.MySqlJDBCAdapter" /> -->
      
        <broker xmlns="http://activemq.apache.org/schema/core" brokerName="${broker-name}" dataDirectory="${data}" restartAllowed="false" start="false">
          <persistenceAdapter>
            <jdbcPersistenceAdapter dataDirectory="${data}" dataSource="#jdbc-ds"/> <!-- adapter="#mysql"/> -->
          </persistenceAdapter>
      ...
      

              gtully@redhat.com Gary Tully
              mtoth@redhat.com Michal Toth
              Oleg Sushchenko Oleg Sushchenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: