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 8 of 175    Print  
What are the call back methods in Session bean

Answered by Jey on 2005-05-08 19:41:22: Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are. 
 
Stateless Session Bean 
1. setSessionContext() 
2. ejbCreate() 
3. ejbRemove() 
 
Stateful Session Bean  
 
1. setSessionContext() 
2.ejbCreate() 
3.ejbPassivate() 
4.ejbActivate() 
5.ejbRemove() 



  
Total Answers and Comments: 8 Last Update: November 26, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 08, 2005 19:41:22   #1  
Jey        

RE: What are the call back methods in Session bean
Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are. 
 
Stateless Session Bean 
1. setSessionContext() 
2. ejbCreate() 
3. ejbRemove() 
 
Stateful Session Bean  
 
1. setSessionContext() 
2.ejbCreate() 
3.ejbPassivate() 
4.ejbActivate() 
5.ejbRemove() 

 
Is this answer useful? Yes | No
June 14, 2005 05:33:03   #2  
suresh chowdary        

RE: What are the call back methods in Session bean
 
for Stateless Session Bean: 
1. setSessionContext()  
2. ejbCreate()  
3. ejbRemove()  
 
for statefull Session Bean: 
1. setSessionContext()  
2.ejbCreate()  
3.ejbPassivate()  
4.ejbActivate()  
5.ejbRemove()  
 

 
Is this answer useful? Yes | No
August 18, 2005 06:51:54   #3  
Jagadeesha M.V        

RE: What are the call back methods in Session bean
Stateless Session Bean  
1. setSessionContext()  
2. ejbCreate()  
3. ejbRemove()  
 
Stateful Session Bean  
 
1. setSessionContext()  
2.ejbCreate()  
3.ejbPassivate()  
4.ejbActivate()  
5.ejbRemove()  

 
Is this answer useful? Yes | No
September 09, 2005 08:21:21   #4  
kamal tuteja        

RE: What are the call back methods in Session bean
Callback method for Stateless Session Bean are :: 
1. setSessionContext()  
2. ejbCreate()  
3. ejbRemove()  
 
Callback method for Stateful Session Bean are:: 
 
1. setSessionContext()  
2.ejbCreate()  
3.ejbPassivate()  
4.ejbActivate()  
5.ejbRemove()  

 
Is this answer useful? Yes | No
September 12, 2005 13:04:48   #5  
shrin        

RE: call back metods for session bean
Session Bean Callback Methods are : 1 . setSessionContext(javax.ejb.SessionContext ctx)2 . javax.ejb.SessionContext getSessionContext() 3 . ejbCreate()4 . ejbRemove()5 . ejbActivate()6 . ejbPassivate()
 
Is this answer useful? Yes | No
October 01, 2005 02:29:50   #6  
sasikumar        

RE: Why it is called call back methods
Jey Wrote: Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are. 
 
Stateless Session Bean 
1. setSessionContext() 
2. ejbCreate() 
3. ejbRemove() 
 
Stateful Session Bean  
 
1. setSessionContext() 
2.ejbCreate() 
3.ejbPassivate() 
4.ejbActivate() 
5.ejbRemove() 


 
Is this answer useful? Yes | No
May 30, 2007 11:34:10   #7  
Satish        

RE: What are the call back methods in Session bean

Session callback methods
setSessionContext();
unsetSessionContext();
ejbLoad();
ejbActivate();
ejbPassivate();
ejbRemove();

Entity bean call back methods
public void setEntityContext(javax.ejb.EntityContext c);

public void unsetEntityContext();public void

ejbLoad();

public void ejbStore();public void

ejbActivate();

public void ejbPassivate();

public void ejbRemove();

In call back methods there is no ejbCreate() method


 
Is this answer useful? Yes | No
November 25, 2008 22:54:16   #8  
ganeshjava Member Since: November 2008   Contribution: 1    

RE: What are the call back methods in Session bean
Please note down that ejbCreate() is not a method of Session Bean, for reference see the link http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/ejb/SessionBean . html
 
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