GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 112 of 175    Print  
what is the use of activate, passivate methods in EJB?

  
Total Answers and Comments: 6 Last Update: November 30, 2006     Asked by: vidya_chintoo 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 19, 2006 01:49:49   #1  
sreenivasulu        

RE: what is the use of activate, passivate methods in ...

Hi,

    ejb activate() and passivate() methods are playing good role in ejbs.

    ejb activate() is the method that donotes the objects which are at active state and at the same time passivate() tells us that objects which are at passive state(at sleeping condition).That means if we take an example like bottle.

If there are 10 bottels are in the box which currently using and means they are active and if u want to fill ane more bottle into that box then we should kept that bottle at another place and if u wants to be activate that 11th bottle then u must lift one bottle from first box and u fill the 11th bottle int that empty space.so,in this conclusion there is one thing iam telling u that if u want to use an object in activate state if there is no space in that part then u must passivate on item in that part must and only fill the one more object.


 
Is this answer useful? Yes | No
April 19, 2006 09:06:34   #2  
sin        

RE: what is the use of activate, passivate methods in ...
What an analogy!!
 
Is this answer useful? Yes | No
June 27, 2006 21:30:38   #3  
Deepak        

RE: what is the use of activate, passivate methods in ...
Pls refer/think before giving answers.
 
Is this answer useful? Yes | No
August 28, 2006 16:51:43   #4  
Pardeep Dureja        

RE: what is the use of activate, passivate methods in ...
It is used to save memory.Container invoke ejbPassivate( ) on the bean on the basis of least recently used algorithm and save it's state on disk, only serializable fields are saved and non serializable fields info is lost and when client call again the values are picked from disk by invoking ejbActivate( )Pardeep Dureja
 
Is this answer useful? Yes | No
October 25, 2006 16:10:23   #5  
bhargavi        

RE: what is the use of activate, passivate methods in ...
ur answer seems to be the one given like a kid
 
Is this answer useful? Yes | No
November 30, 2006 00:37:47   #6  
maulin rao        

RE: what is the use of activate, passivate methods in ...
This are call back methods It means container will call this method before it actually activate or passivate the bean. This gives you a chance to put your own logic to do some stuff like logging or clean up.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape