This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
Boost this thread!