• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMT, Hibernate 3, JBoss and Transactions

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In "Hibernate in Action", in the transaction section it states that session.beginTransaction() will join the JTA transaction, and tx.commit() is called to communicate witht he databse.

Is this a must, if you have your method demarcated using EJB 3.0 transaction. declaring it as "RequiresNew" as the annotation on the method?

Another person here at work stated that in another company he worked using EJB 2.1 they did not need to have a call to session.beginTransaction() or tx.commit(), that because you have a CMT transaction, it handles it all. He was also using Weblogic and not JBoss in that other company.

Thanks for your help.

Mark
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup hibernateSession.beginTransaction() joins JTA.
When I used with weblogic, since I don't need JTA, I ended up by saying not supported for all SLSB methods.

Howwever I have not tested what impact it will make when I will not use begintransaction and commit.

I can update you in couple of days.
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I forget to mention I am using Hibernate2.0.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic