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

can be passivated when the bean instance is associated with a transaction?

 
vijay Mamilla
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An entity bean instance with container-managed persistence can be passivated when the bean instance is associated with a transaction.
Is it true?

Thanks,
Vijay
 
David McDonagh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the answer is false. Beans only get passivate before the instance becomes disassociated with a specific EJB object. Therefore ejbPassivate() executes in an unspecified transaction context.
 
Vijay Dasari
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
According to Spec :-
The container can choose to passivate an entity bean within a transaction.
Before passivating it calls
1. ejbStore() ( which will be called within a transactional context)
2. ejbPassivate() ( this action does not really need a transactional context)

Where as a Stateful session bean will never be passivated within a transaction.

Vijay.
 
vijay Mamilla
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Vijay ...Thanks Vijay
 
David McDonagh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya Vijay is correct ..... from the spec P208 "10.9.3 Passivating and activating" the interaction diagram clearly shows that cmp can be passivated after ejbStore() is called.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic