"pradeeps" wrote : | The connection that is gotten from this datasource is going to participate in a distributed transaction with JMS XA QueueConnectionFactory. I am using the Atomikos JTA API. | | This distributed TX will happen only if both the resources support XA. | | Are you recommending that I create the XADataSource object in my code and not look up using JNDI? | | Thanks. | I assume that you must have Atomikos TM configured with the JBoss.Now when you are getting the connection from the xa-datasource the jca framework will transparently enlist the connection associated with the datasource in the ongoing transaction. Here is the psuedo code :
UserTransaction utx = (UserTransaction) ctx.lookup("UserTransaction"); | | Getting JMS XA QueueConnectionFactory from JNDI | | Getting JMS session which will also enlist the corresponding XAResource in the ongoing TX | | DataSource ds = (DataSource) ctx.lookup("java:/pxDS"); | Connection con = ds.getConnection(); // Here JCA will enlist the connection(precisely XAResource) in ongoing JTA transaction transparently. | utx.commit(); | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184898#4184898 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184898 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user