Jaboss Datasource Configuration for MySQL - MysqlXADataSource Element

I looked at a few examples for setting up a data source for MySQL in Jboss 7. All the links that I saw for the item look like this:

<driver name="com.mysql" module="com.mysql">
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>

I know what it is <driver-class>, but what is <xa-datasource-class>its purpose?

When I set up the data source on Tomcat, before I needed to specify xa-datasource for any database. Why is it different here?

thank

+5
source share
1 answer

jdbc 4.0 (12.2): XA XA, / . , , JMS. : http://www.theserverside.com/discussions/thread.tss?thread_id=21385#95346

, xa-datasource, . , , xa-datasource .

<datasources>
    <datasource jndi-name="java:/myDatasource" pool-name="MyDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
                <connection-url>
                    jdbc:mysql://localhost:3306/mydb
                </connection-url>
                <driver>
                    mysql
                </driver>
                <transaction-isolation>
                    TRANSACTION_READ_COMMITTED
                </transaction-isolation>
                <pool>
                    <min-pool-size>
                        5
                    </min-pool-size>
                    <max-pool-size>
                        10
                    </max-pool-size>
                    <prefill>
                        true
                    </prefill>
                    <use-strict-min>
                        false
                    </use-strict-min>
                    <flush-strategy>
                        FailingConnectionOnly
                    </flush-strategy>
                </pool>
                <security>
                    <user-name>
                        username
                    </user-name>
                    <password>
                        password
                    </password>
                </security>
            </datasource>
            <drivers>
                <driver name="mysql" module="com.mysql"/>
            </drivers>
        </datasources>
+7

All Articles