• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Same entitymanager joins multiple JTA transactions concurrently

 
xinyu liu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is originated from the drools-jpa-persistence package.
An application-scoped entitymanager (singleton) is shared by all clients. When the entitymanager joins a JTA transaction in one thread, before that transaction ends, it may be invoked on entityManager.joinTransaction() in another thread for a different JTA transaction. My question is how Hibernate session reacts to the joinTransaction() method call. I would expect it suspends the 2nd thread till the 1st transaction ends. Please shed some lights. Many thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic