This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Transction over EJB Transaction

 
nidhish
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any one explian the difference between ejb transaction and JDBC transaction.

Which should be used for small application ejb transaction or JDBC transaction

Thanks
Nidha
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDBC transactions are managed by the database via the Database Connection.
EJB transactions are managed by EJB container and tries to combine several external transactions (eg JDBC) in a single EJB transaction context. This is a bit complicated and gets into things like 'two phase commits' and 'distributed transactions', but it is a thing the EJB container does for you.

Personally: If you are using EJBs then use EJB transactions, otherwise stick to JDBC transactions.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"nidha",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic