• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What Happens To The Bean Object After Passivation ?

 
Rajnish Bhasin
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question has always lingered in my mind, when i hear that even Stateful Session Beans are SCALABLE in the sense that they can be(OR better the STATE of a STATEFUL SESSION BEAN)passivated. This allows for saving resources on the container.
My Questions are:
1)How is the container saving on resources when a stateful session bean is passivated. Does it also nullify the bean whose state has been passivated to some kind of storage ?, thereby making the BeanObject eligible for garbage collection?
2)There is no POOL in case of the stateful session bean, so where does the bean that has been passivated go?, what does the container do with the Bean?
3)What does the container do at the time of activation ? Does it create a new Bean Object and initialize with the values that were passivated ? If that is not the case which bean Object does the container Initialize with the already passivated values ? And if it does make a new Bean to initialize with the passivated values then why is a ejbCreate() not called again ?
I hope my questions are legitimate... and i receive a good response from some one.
Thanks Guys.
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of those details, the HFEJB book suggests, are left to the implementor and are not covered by the exam.
We have to know only the behavior expected from the container without worrying on how it actually does certain things.
I am only answering this way because of the title of this forum...
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajnish,
I agree with Tony. Your questions are all vendor-specific. The vendor is free to implement them in different ways that favour them. If you are too ecstatic about this, I would suggest JBoss, an open-source application server. You can take a peek at the source code and perhaps enlighten us also
[ April 22, 2004: Message edited by: Vishwa Kumba ]
 
Vaithiya Sundaram
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think Rajnish has asked some reasonable questions....but the responses for his questions are not good. Whether it is part of Exam or not, it is good to know the answers.
 
Leon Chen
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is: vendor-specific
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vaithiya Sundaram:
I think Rajnish has asked some reasonable questions....but the responses for his questions are not good. Whether it is part of Exam or not, it is good to know the answers.

Most of us happen to be EJB developers or aspire to become EJB developers(bean providers). These roles do not deal with the internal details of the EJB Container. Somebody who knows the internals of weblogic/websphere or some other application server might be able to throw some light. But again that is proprietary information which they may or may not be willing to share with others. Hence I suggested JBoss!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic