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

JTA and JDBC code

 
scott miles
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic