Posted on 2006-09-01 08:55
Jedi 阅读(1108)
评论(0) 编辑 收藏
1. mysql driver -> server\default\lib
2. jdbc connection datasource server/default/deploy/mysql-xa-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<xa-datasource>
<jndi-name>MySqlXADS</jndi-name>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
<xa-datasource-property name="Url">jdbc:mysql://127.0.0.1:3306/temp</xa-datasource-property>
<xa-datasource-property name="User">root</xa-datasource-property>
<xa-datasource-property name="Password">....</xa-datasource-property>
<user-name>root</user-name>
<password>.....</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</xa-datasource>
</datasources>
3. server/default/conf/standardjbosscmp-jdbc.xml
<defaults>
<datasource>java:/MySqlXADS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
....
....
</defaults>
4. server/default/conf/jboss-service.xml
<mbean code="org.jboss.tm.XidFactory"
name="jboss:service=XidFactory">
//uncommented the line below...
<attribute name="Pad">true</attribute>
</mbean>