Re: Configuring XAtransaction on MySQL 4.1 with jboss 3.2.7
Posted by: Mark Matthews
Date: July 07, 2005 07:13AM

c l wrote:
> Hi I've got a problem
> I want to use the XA transaction on MySql 4.1. I
> have the mysql-connector-java-3.2.0-alpha-bin.jar
> but i don't now how create the mysql-xa-ds.xml to
> put in jboss3.2.7 deploy folder.
> any suggestion?
>
> please help me.
>
> thanks
>
> carlo


Carlo,

First, use a nightly build of 3.2 from http://downloads.mysql.com/snapshots.php#connector-j

3.2.0 won't work with the version of the server that has XA implemented currently.

Then, you'll need a datasource config something like this:

<xa-datasource>
<jndi-name>MySqlDS</jndi-name>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:mysql://localhost:3306/test</xa-datasource-property>
<user-name></user-name>
<password></password>
<track-connection-by-tx>true</track-connection-by-tx>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</xa-datasource>

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.