File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes JDBC level transaction vs. JTA/JTS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JDBC level transaction vs. JTA/JTS" Watch "JDBC level transaction vs. JTA/JTS" New topic

JDBC level transaction vs. JTA/JTS

Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
For bean managed transaction, if there is no distributed transactions envoled and my database operations are in a single method with single phase transaction, the effect of using JTA/JTS and the effect of using JDBC level transaction (Connection.setAutoCommit(false)) are the same.
Am I right?
By the way, has anybody seen "enlist transaction error ..." on WebSphere with Oracle 8i XADataSource?
Thanks in adance ...

SCJP, SCJD, SCWCD, SCBCD, SCEA, IBM Certified Enterprise Developer, WebSphere Studio V5.0
James Du
Ranch Hand

Joined: Mar 23, 2001
Posts: 186
I have the same problem, anyone could help please?

Go a little further, what if 2 BMTs' 2 methods are involved?

Thanks a lot
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
There are several differences that could influence your design. One of the differences between JTA and JDBC is that JTA doesn't support nested transactions, while JDBC might do. Another difference is related to SFSB: in both cases the transactional context is retained during multiple client calls. If the connection is closed, JDBC will lose the association between the bean and transactional context; it won�t get lost with JTA though.

I think, therefore I exist -- Rene Descartes
I agree. Here's the link:
subject: JDBC level transaction vs. JTA/JTS
jQuery in Action, 3rd edition