JBoss Configuration
Download the sql server jdbc driver from microsoft. You will need to put this into the appropriate lib directory in jboss. The driver also contains documentation on how to configure sql server for xa connections and it can also be on microsoft.com.
Copy the default example config:
cp <JBOSS_HOME>/docs/examples/jca/mssql-xa-ds.xml <JBOSS_HOME>/server/default/deploy
Next update the config with your settings:
<datasources> <xa-datasource> <jndi-name>JNDINAME</jndi-name> <track-connection-by-tx /> <isSameRM-override-value>false</isSameRM-override-value> <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class> <xa-datasource-property name="ServerName">HOSTNAME</xa-datasource-property> <xa-datasource-property name="DatabaseName">DBNAME</xa-datasource-property> <xa-datasource-property name="SelectMethod">cursor</xa-datasource-property> <xa-datasource-property name="User">USERNAME</xa-datasource-property> <xa-datasource-property name="Password">PASSWORD</xa-datasource-property> <xa-datasource-property name="URL">jdbc:sqlserver://HOSTNAME:1433</xa-datasource-property> <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> <metadata> <type-mapping>MS SQLSERVER2000</type-mapping> </metadata> </xa-datasource> </datasources>
You also need to make sure that your windows environment is setup to support transactions from a remote source, details for Vista are here.
No comments:
Post a Comment