activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giovanni Delloro <j.vergou...@gmail.com>
Subject Question regarding XA transactions
Date Mon, 27 Feb 2017 15:28:37 GMT
We are using ActiveMQ with a MySQL database for persistent messages. To be
able to support XA transactions, do I need to configure an XA datasource for
the database in activemq.xml? I have searched the web quite extensively and
this doesn't seem to be the case, but I haven't found a conclusive answer
yet.

The reason I ask is the fact that we are currently upgrading ActiveMQ from
v5.10.0 to v5.14.3.

Our v5.10.0 MySQL datasource configuration looked like this, mentioning an
XA datasource:

  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
    <property name="driverClassName"
value="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"/>
    <property name="url"
value="jdbc:mysql://{host}:{port}/{database}?relaxAutoCommit=true"/>
    <property name="username" value="{user}"/>
    <property name="password" value="{password}"/>
    <property name="maxActive" value="20"/>
    <property name="defaultTransactionIsolation" value="2"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>

When using this configuration in v5.14.3 the broker won't start because
MysqlXADataSource is not a jdbc Driver. So much I understand.

With v5.14.3 we now use the following database configuration:

  <bean id="mysql-ds" class="org.apache.commons.dbcp2.BasicDataSource"
destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
value="jdbc:mysql://{host}:{port}/{database}?relaxAutoCommit=true"/>
    <property name="username" value="{user}"/>
    <property name="password" value="{password}"/>
    <property name="maxTotal" value="20"/>
    <property name="defaultTransactionIsolation" value="2"/>
    <property name="poolPreparedStatements" value="true"/> 
  </bean>

Does this configuration still allow for XA transaction support?
If not, how should I configure the mysql-ds?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Question-regarding-XA-transactions-tp4722534.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message