Solved

activation is use to conserve resourse in stateful session bean?

Posted on 2004-08-07
7
217 Views
Last Modified: 2010-03-17
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.
0
Comment
Question by:she1
  • 4
  • 2
7 Comments
 
LVL 11

Accepted Solution

by:
sompol_kiatkamolchai earned 50 total points
ID: 11764847
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
 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 11764965
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
 

Author Comment

by:she1
ID: 11798930
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 11806816
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
 

Author Comment

by:she1
ID: 12012799
thanks lot, exellent explain. sorry for later reply
0
 
LVL 11

Expert Comment

by:sompol_kiatkamolchai
ID: 12016190
thanks for the points.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Convert websphere application server default chained Certificates from 1024 to 2048 keysize or higher size and also you can change signatureAlgorithm . Please make sure Websphere Application Server fixpack 7.0.0.23 or Above. The following steps a…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now