Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PersistenceContext Collision

 
Joe Harry
Ranch Hand
Posts: 10045
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

Imagine we have a scenario wherein I have a transaction-scoped PersistenceContext created from a Stateless session bean. Now this will be propogated to call a method in a Stateful session bean that has an extended PersistenceContext. What happens in this scenario? Which will be the active PersistenceContext as seen by the container? The one from the Stateful session bean or the one from the Stateless session bean?
 
Prateek Kumar Singh
Ranch Hand
Posts: 30
Eclipse IDE Hibernate Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,


the stateful session bean will find the transaction-scoped persistence context
created by the stateless session bean, and the call into the stateful session bean method will fail. There
can be only one active persistence context for a transaction

hope it will help you to find the answer.




Prateek Singh with Suman Saha

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic