wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes JTA or JDBC transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JTA or JDBC transaction" Watch "JTA or JDBC transaction" New topic
Author

JTA or JDBC transaction

Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
In one session bean, this transaction involves a bunch of SQL calls to database. But all of them are in the same method of this bean. I understand both JTA or regular JDBC level transaction control will work. Which one is prefered though?
Thanks in advance ...


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Since you are already using EJB, in this case Session Beans, then it is easiest to just go with CMT which will make use of JTA. However, if you didn't already have this infrastructure in place then I would have went with the simplist solution possible which in this case (without considering any other requirements that I don't know of) would mean plain JDBC.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTA or JDBC transaction
 
Similar Threads
JTA Transaction isolation level
JDBC - 1.5 Transaction ?
JDBC connection and transactions
Entity bean and bean managed transaction
Make hibernate use JTA transaction in WAS 5.1