S2のJTAとコネクションプールではなく、WebLogic、WebSphere、JBossのJTAとコネクションプールを使いS2Txと連動させることもできます。コンポーネントの定義(j2ee-config.xml)はは次のとおりです。
<component name="initialContext" class="javax.naming.InitialContext"/>
<component name="transactionManager" class="javax.transaction.TransactionManager">
initialContext.lookup('javax.transaction.TransactionManager')
</component>
<component class="javax.sql.DataSource"> initialContext.lookup('jndiName')
</component>
<component name="initialContext" class="javax.naming.InitialContext"/>
<component name="transactionManager"
class="org.seasar.extension.j2ee.SingletonTransactionManager">
<arg>'com.ibm.ejs.jts.jta.JTSXA'</arg>
<arg>'getTransactionManager'</arg>
</component>
<component
class="org.seasar.extension.j2ee.JndiDataSource">
<arg>initialContext</arg>
<arg>'jndiName'</arg>
</component>
<component name="initialContext" class="javax.naming.InitialContext"/>
<component name="transactionManager"
class="org.seasar.extension.j2ee.SingletonTransactionManager">
<arg>'com.ibm.ejs.jts.jta.TransactionManagerFactory'</arg>
<arg>'getTransactionManager'</arg>
</component>
<component
class="org.seasar.extension.j2ee.JndiDataSource">
<arg>initialContext</arg>
<arg>'jndiName'</arg>
</component>
<component name="initialContext" class="javax.naming.InitialContext"/>
<component name="transactionManager"
class="org.seasar.extension.j2ee.JndiTransactionManager">
<arg>initialContext</arg>
<arg>'java:/TransactionManager'</arg>
</component>
<component
class="org.seasar.extension.j2ee.JndiDataSource">
<arg>initialContext</arg>
<arg>'jndiName'</arg>
</component>