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 eGuide to Automating Firewall Change Control

Today’s IT environment is constantly changing, which affects security policies and firewall rules. Discover tips to help you embrace this change through process improvement & identify areas where automation & actionable intelligence can enhance both security and business agility.

 
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
All Courses

From novice to tech pro — start learning today.