activation is use to conserve resourse in stateful session bean?

why we say activation is use to conserve resourse in stateful session bean?

as stateful session bean do not participate in instace pooling like stateless session bean and entity bean.
she1Asked:
Who is Participating?
 
sompol_kiatkamolchaiConnect With a Mentor Commented:
Here is the stateful session bean life cycle

       ____________
      |Does not exist|
              |   ^
              |   |
              v   |
       ____________                            _______
      |Method ready|   <=======>   | Passive |


Since memory is fixed, a container can free up memory by passivating.
When statefule session bean is in passive state it is stored in secondary storage
and cannot serve client request. So, to have a good management of server side
resource such as database connection we should release connection in ejbPassivate()
and re-claim on ejbActivate()

You may not know that Statefule session bean also have instance pooling like entity or stateless
I will explain you more in the next comment.
0
 
sompol_kiatkamolchaiCommented:
Sorry after I check EJB spec this bean type don't have instance pooling concept like you said.
I think prior comment already answer your question.
:)
0
 
she1Author Commented:
you says:""When statefule session bean is in passive state it is stored in secondary storage and cannot serve client request. ""

so the statefule session must implement the seriable??

thanks
0
The Lifecycle Approach to Managing Security Policy

Managing application connectivity and security policies can be achieved more effectively when following a framework that automates repeatable processes and ensures that the right activities are performed in the right order.

 
sompol_kiatkamolchaiCommented:
Since stateful session bean object extends SessionBean
and SessionBean extends EnterpriseBean
and EnterpriseBean extends java.io.Serializable

so we do not need to implement Serializable again.
0
 
she1Author Commented:
thanks lot, exellent explain. sorry for later reply
0
 
sompol_kiatkamolchaiCommented:
thanks for the points.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.