Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

activation is use to conserve resourse in stateful session bean?

Posted on 2004-08-07
7
220 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

860 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