[jboss-dev-forums] [Design of JCA on JBoss] - Re: JcaXAResourceRecovery

jhalliday do-not-reply at jboss.com
Tue Jul 15 10:45:12 EDT 2008


Now that AS trunk uses JBossTS 4.4.0.CR1, the transaction maanger side of the XAResourceRecoveryRegistry is available. The JCA now probably needs updating to register suitable XAResource(s) for any datasources.

Here is a trivial usage example to get you started:


  | import org.jboss.tm.XAResourceRecovery;
  | import javax.transaction.xa.XAResource;
  | 
  | public class TestASXAResourceRecovery implements XAResourceRecovery
  | {
  |     public XAResource[] getXAResources()
  |     {
  |         System.out.println("you should see this on every recovery pass i.e. every two minutes");
  |         return new XAResource[0];
  |     }
  | }
  | 

deploy/test-beans.xml:


  | <?xml version="1.0" encoding="UTF-8"?>
  | <deployment xmlns="urn:jboss:bean-deployer:2.0">
  | 
  | <bean name="MyConnectionManager" class="TestASXAResourceRecovery">
  |    <install bean="TransactionManager" method="addXAResourceRecovery">
  |       <parameter><this/></parameter>
  |    </install>
  |    <uninstall bean="TransactionManager" method="removeXAResourceRecovery">
  |       <parameter><this/></parameter>
  |    </uninstall>
  | </bean>
  | 
  | </deployment>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164511#4164511

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164511



More information about the jboss-dev-forums mailing list