[jboss-user] [Datasource Configuration] - JBoss 7 Without XA Data Sources

Randy Layman do-not-reply at jboss.com
Thu Sep 6 18:28:54 EDT 2012


Randy Layman [https://community.jboss.org/people/randy.layman] created the discussion

"JBoss 7 Without XA Data Sources"

To view the discussion, visit: https://community.jboss.org/message/758435#758435

--------------------------------------------------------------
I am porting our application from JBoss 4 to JBoss 7 and have run into a snag.  For a few very specific use cases we use two data sources within the same JTA transaction context (manged via Spring's TransactionProxyFactoryBean).  We want transactions on one data source to not impact the other.  In JBoss 4 we accomplished this by not using XA Data Sources.  This seems to have caused JTA to commit one transaction after the other independently.  For all other use cases, we use a single Data Source and therefore don't need XA functionality.

In moving to JBoss 7, I initially configured the same way -- non-XA data sources.  However when the second data source was first referenced I got a an error message that meant you can't have two non-XA data sources in the same transaction.  Configuring with XA data sources does allow the application to function, but now the two transactions are married together.

Is there anyway to configure JBoss 7 to not use XA transactions in JTA managed transactions?

For the curious, here is our main use case:  In the course of fulfilling an order from customers we charge their credit card and we configure their newly purchased service.  We never, ever, want the bank to have a record of a credit card transaction that we don't.  So we have a seperate database (and thus data source) for the credit card transactions.  And we want those transactions to always commit, regardless of any issues we might have configuring their service that causes a rollback.

If it is relevant we are using JBoss 7.1.1-Final connecting to Postgres 8 (with the Postgres 9 database driver) running on JDK 1.6.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/758435#758435]

Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120906/90826482/attachment.html 


More information about the jboss-user mailing list