How to create mysql xa-datasource on JBoss 7.1

To create datasource with distributed transactions support, you should follow those steps:

1. Create mysql connector module on server

Add following structure in folder ’{JBOSS_HOME}\modules:

  • /com
    • /mysql
      • /main
        • module.xml
        • mysql-connector-java-5.1.25-bin.jar

Where module.xml contains:

 2. Create xa-datasource

Add datasource definitions to server config file, where by default is used ‘standalone.xml’ from ‘{JBOSS_HOME}\standalone\configuration’

Leave a Reply


− 1 = zero