• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transactions

 
shah rah
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a difference between the way EJB handles transaction to the way Hibernate does.
In my project we do not have EJB's and all the DB transactions are done using hibernate. for eg I open transaction after Session is created and close once all the database work is complete.

appreciate your reply.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, transactions are transactions whatever the technology that starts on is.

Hibernate can be configured to use transactions in differernt ways, i.e. it can enlist in the EJBs CMT or do its own.
 
ahmad seddighi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transactions are transactions! But in Java applications, there are several APIs (or approaches) to manage transactions:
  • JDBC Transaction API
  • Java Transaction API (JTA)
  • Hibernate Transaction API
  • JPA Transaction API
  • Spring Transaction Abstraction API

  • To manage transactions in Hibernate applications, you can use Hibernate native API, JPA transaction API if you are developing on JPA, JTA if you are developing with multiple transactional resources, or preferably use Spring transaction abstraction API if you are developing Hibernate with Spring. You can find more about transaction management in Spring Persistence with Hibernate
    ---------------------------------------------------------------------------------------------------------------------------------------------



    Spring Persistence with Hibernate, By Ahmad Reza Seddighi
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic