Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

clarification about ejbRemove()  RSS feed

 
Bhaghavathi Kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For stateful session bean, when the client doesnt make any calls for a long time , the bean gets passivated.

But there is a scenario mentioned in the Headfirst book (Pg: 210) that says that Bean timeout while active calls ejbRemove() on the bean

Could someone distinguish the 2 scenarios as to when the client doesnt make any methods calls, is the bean passivated or removed?
 
Napu Sun
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If bean instance hasn't been used in a period of time, container call its ejbPassivate(). If Ejb object's life time is expired, container call its ejbRemove().
Please refer to EJB 2.0 spec Page 78, 79
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!