The moose likes EJB and other Java EE Technologies and the fly likes JTA and JDBC code 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 and JDBC code" Watch "JTA and JDBC code" New topic

JTA and JDBC code

scott miles
Ranch Hand

Joined: Jun 16, 2011
Posts: 70
I am bit confused when we connect to databse from java application.I have always worked on JDBC.

I have questiions about JTA and ORM like hibernate.

1) Does they also use JDBC internally or they have separate mechanism altogether?

2) I have seen some JTA api code but everywhere on different sites it does not say how do we get connection and execute the statement.

3)Can we couple JTA with JDBC like

//Step1 begin Transaction with JTA

//Step2 Now JDBC code for getting the connection ,statement and executing them.

//Step3 End Transaction with JTA

can we do the step 2 as i mentioned above or connection , statement needs to be acquired with JTA apis like XADatasource.?
I agree. Here's the link:
subject: JTA and JDBC code
It's not a secret anymore!