Does Mule support MySQL database connection pooling with XA transaction? if yes could you please provide me the configuration?
Asked
Active
Viewed 468 times
0
2 Answers
0
Yes it does. You can configure it using Spring bean configuration like below.
<spring:beans>
<spring:bean id="mySqlXADataSource" name="MySqlXADataSource" class="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource">
<spring:property name="user" value="root" />
<spring:property name="password" value="root" />
<spring:property name="url" value="jdbc:mysql://localhost:3306/dev" />
</spring:bean>
</spring:beans>
and refer the above bean definition in mule mysql connector like
<db:mysql-config name="MySQL_XA_Configuration" dataSource-ref="mySqlXADataSource" doc:name="MySQL Configuration" />
For your reference here is an example flow on XA transaction between MySQL and JMS ActiveMQ

Ram Bavireddi
- 1,139
- 1
- 19
- 43
-
Above Data source supports XA transaction .But how to implement connection pooling for the same Datasource? How to configure the properties like minPoolSize,maxPoolSize like that !!! – Gopi Dec 15 '15 at 10:55
0
Mule does support XA Transaction handling. Here's a good example with configurations.
http://blogs.mulesoft.com/dev/mule-dev/how-to-work-with-jdbc-and-xa-transactions/
Remember that Mule supports the transaction handling but the real work is the XML configuration of the Spring Beans (Java).

David Whitehurst
- 352
- 4
- 21