Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Propogation

 
Nikhil Jain
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you understand by

If the component is a stateful session bean to which an extended persistence context has been bound and there is a different persistence context bound to the JTA transaction, an EJBException is thrown by the container?
How and when, this scenario can arise?

Is there any good book that talks about Context/transaction propogation?

Thanks
 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If somebody knows about this, please answer the question. I am also somewhat confused about which scenarios would this occur.
 
Pavan Shahi
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..

If you have a stateless session bean which have container managed persistence context.In this case when you call any method of entity manager at this pont a new persistence context is created and associated with your JTA transaction. Now if this bean call statefull session bean to which an extended persistence context has been bound and has transaction attribute REQUIRED, MANDATORY in this case JTA transaction already has one persistence context bound and statefull session bean now try to bound another persistence context hence you have big EJBException.

Hope i explain correctly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic