Solved

activation is use to conserve resourse in stateful session bean?

Posted on 2004-08-07
7
219 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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.

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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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