• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entity bean - passivated in a TX !

 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this has been discussed before...
EJB2.0 Spec, p:169
"The container can choose to passivate an entity bean instance within a transaction. To passivate an instance, the container first invokes the ejbStore method to allow the instance to prepare itself for the synchronization of the database state with the instance’s state, and then the container invokes the ejbPassivate method to return the instance to the pooled state."
A SFSB cannot be passivated when it is in a transaction, right?....But the container can choose to passivate an Entity Bean instance within a transaction?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep -- SFSB can NOT be passivated while in a transaction (which is yet another *really* good reason to NOT leave transactions open in SFSB methods...) but entity beans CAN be passivated. But remember, passivation for entity beans and SFSB have two completely different meanings. The only thing they share is the *name* ("passivation") and that they both are a form of improving scalability. But that's the only thing they have in common
cheers,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic