This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB and JDBC/Distributed Transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB and JDBC/Distributed Transactions" Watch "EJB and JDBC/Distributed Transactions" New topic
Author

EJB and JDBC/Distributed Transactions

Cory Wilkerson
Ranch Hand

Joined: Aug 14, 2001
Posts: 84
All,
I'm attempting to get my head around something here and I can't make 2 and 2 == 4. My question is this:
I've currently stepped into a pretty hefty EJB-based architecture where all EJBs (BMP) have the trans-attribute set to Required. Does this implicity imply that Connection objects used by any given business method in any given entity bean must be generated from a DataSource that supports distributed transactions?
I understand that it means that the business method itself will execute in a transactional context, but, must the JDBC resources being used also support distributed functionality.
Thanks,
Cory Wilkerson
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
The answer is yes, probably. Most Transaction Servers do support the idea of both global and local transactions, but the support for local transactions is usually vendor-specific and somewhat limited. If you choose to use a 2PC enabled datasource the container can usually figure out on its own if it can optimize for 1PC if that's all that's needed.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
 
subject: EJB and JDBC/Distributed Transactions
 
Similar Threads
EJB/JDBC Transactions
Why EJB ?
To be J2EE/EJB or not?
Distributed transactions
What is EJB ?