Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can we handle transactions using Java Connector Architecture?

 
Sumit Bhoyar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not expecting actual code. Only concept or description will be enough.
 
William P O'Sullivan
Ranch Hand
Posts: 859
Chrome IBM DB2 Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plenty of concepts in here ...

http://en.wikipedia.org/wiki/Java_EE_Connector_Architecture

WP
 
Sunderam Goplalan
Ranch Hand
Posts: 86
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally the transactions in JCA are managed by the Application Server. App server implements the Transaction contracts between itself and the back end system. I believe application servers such as JBOSS or WAS implement JCA even for setting up connections to RDBMS like Oracle. In this case, it's usually set up as a LOCAL TRANSACTION without the need for an external transactional coordinator.

However if you use JCA to talk to multiple data sources (say, Oracle and LEGACY System), it needs to be set up as XA transaction with the need for an external transaction coordinator that can do a Two phase commit.
Developers would be providing configuration information alone (Local or XA, login credentials and other metadata) while the Application server usually implements the Transaction contracts required by the Application.
 
Sumit Bhoyar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sunderam for this info.
So this is my understanding-
Some JCA adapters doesn't support transactions.
If JCA adapter is communicating with single system and managing transaction, then it is set up as LOCAL TRANSACTION.
If JCA adapter is communicating with multiple systems and managing transaction, then it is set up as XATransaction.

Please correct me if I am wrong.
 
Sunderam Goplalan
Ranch Hand
Posts: 86
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct.

As for this "Some JCA adapters doesn't support transactions", I'm inclined to think that, at least in 2012, is that most JCA adapters DO support transactions. Few may not, as you say, yes.
 
Sharma Ashutosh
Bartender
Posts: 346
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And i believe any JCA adapter which doesn't support XA transaction-corresponding adapters from the Application server vendors are provided to fulfill this need.
 
Sumit Bhoyar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sunderam, Ashutosh for your comments
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic