JBoss Community

Re: Two-phase commit using an XA-datasource

created by Michael Musgrove in JBoss AS 7 Development - View the full discussion

The AS7 quickstarts (https://github.com/jboss-jdf/jboss-as-quickstart) have some transactions examples including how to update two datasources within a single transaction (look for CMT, BMT, jts and the crash-rec examples).

 

It is possible to enlist a single non-XA aware datasource (search for LRCO for details) but we don't support it since it is not a recommended configuration.

 

The transaction manager is initialised by the AS so you don't create it yourself. Normally you would use the EJB mechanisms for controlling transactions - the quickstarts cover both bean managed and container managed transactions. If you really want to get hold of the transaction manager you can look it up via JNDI (but the name is not standardised by the specifications, I believe AS7 uses java:jboss/TransactionManager).

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community