http://localhost:7001/console/index.jsp
.SupportsLocalTransaction=“true”
in the file config.xml. This look like<JDBCConnectionPool CapacityIncrement="1" DriverName="com.inet.tds.DTCDataSource" InitialCapacity="1" MaxCapacity="2" Name="inetOptaXAPool" Properties="user=sa;password=;dataSourceName=inetOptaXAPool; databaseName=master;serverName=LocalHost" SupportsLocalTransaction="true" Targets="examplesServer" />
*** If you can't install the Resource Manager Proxy in the SQL Server then you can use com.inet.tds.XDataSource instead of com.inet.tds.DTCDataSource.
<?php xml version="1.0" encoding="Cp1252"?> <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'> <ejb-jar> <description>no description</description> <display-name>XASampleJar</display-name> <enterprise-beans> <session> <description>no description</description> <display-name>Enterprise Bean</display-name> <ejb-name>Enterprise Bean</ejb-name> <home>sample.xa.XATdsHome</home> <remote>sample.xa.XATds</remote> <ejb-class>sample.xa.XATdsEJB</ejb-class> <session-type>Stateful</session-type> <transaction-type>Bean</transaction-type> <resource-ref> <res-ref-name>jdbc/TdsSample</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </session> </enterprise-beans> </ejb-jar>
jar -cf XaSample.jar sample.xa.XATdsHome sample.xa.XATds sample.xa.XATdsEJB meta-infejb-jar.xml
java -cp .;XASampleClient.jar;j2ee.jar sample/xa/XATdsClient