So I post how I've connected the MySql database using Atomikos and Tomcat 6:
Please follow the intructions that are posted here http://www.atomikos.com/Documentation/Tomcat6Integration33.
For the Web app please use the followin configuration in your WebApp Context File
Change the XA connection Properties according to your environment!!!
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/dbtest" docBase="dbtest.war"
reloadable="true" crossContext="true"><Resource
name="jdbc/myDB"
auth="Container"
type="com.atomikos.jdbc.AtomikosDataSourceBean"
factory="com.atomikos.tomcat.BeanFactory"
uniqueResourceName="jdbc/myDB"xaDataSourceClassName="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
xaProperties.databaseName="test"
xaProperties.serverName="localhost"
xaProperties.port="3306"
xaProperties.user="USER"
xaProperties.password="PASSWORD"
xaProperties.url="jdbc:mysql://localhost:3306/test"/>
</Context>
See you!
No comments:
Post a Comment