This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Bean Passivation

 
Rahul JG
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given that the conversational state of the bean is passivated and the bean evicted from memory to conserve resources, if the client calls a method on the passivated bean instance, how does the container pick up the correct conversational state for the client.
How does the EJBObject help in this, if at all?
 
padhu Vinirs
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB servers must follow the rules of Java serialization to do passivation. All instance fields must be serializable. There are other objects types that can be passivated.
Here is a list of objects held by the bean that will be passivated ( from a ejb book ):
1. Serializable object
2. Null
3. Reference to ejb's component interface
4. Reference to ejb's home interface
5. Reference to SessionContext
6. Reference to environment-naming context
7. Reference to UserTransaction object
8. Reference to resource manager connection factory
9. Other objects that are not serializable but acquire the ability to be serializable
 
Rahul JG
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I didn't make myself clear enough.
I just want to know the exact mechanism of how the container is able to track which passivated bean instance belongs to which client.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic