Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it ok to start a Hibernate transaction inside a JTA tx?

 
Ogi K
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a session bean method which has a container managed tx associated with it. It calls a method on a DAO class, which has:

tx = s.beginTransaction();
..
tx.commit();

inside it. The reason being, this method could be called from within an already running JTA tx, or standalone, in which case, it would have it's own tx.

Is there a problem with this approach?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic