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() 

Showing Answers 1 - 12 of 12 Answers

Jey

  • May 8th, 2005
 

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() 

  Was this answer useful?  Yes

suresh chowdary

  • Jun 14th, 2005
 

 
for Stateless Session Bean: 
1. setSessionContext()  
2. ejbCreate()  
3. ejbRemove()  
 
for statefull Session Bean: 
1. setSessionContext()  
2.ejbCreate()  
3.ejbPassivate()  
4.ejbActivate()  
5.ejbRemove()  
 

  Was this answer useful?  Yes

Jagadeesha M.V

  • Aug 18th, 2005
 

Stateless Session Bean  
1. setSessionContext()  
2. ejbCreate()  
3. ejbRemove()  
 
Stateful Session Bean  
 
1. setSessionContext()  
2.ejbCreate()  
3.ejbPassivate()  
4.ejbActivate()  
5.ejbRemove()  

  Was this answer useful?  Yes

kamal tuteja

  • Sep 9th, 2005
 

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()  

  Was this answer useful?  Yes

shrin

  • Sep 12th, 2005
 

Session Bean Callback Methods are : 1 . setSessionContext(javax.ejb.SessionContext ctx)2 . javax.ejb.SessionContext getSessionContext() 3 . ejbCreate()4 . ejbRemove()5 . ejbActivate()6 . ejbPassivate()

  Was this answer useful?  Yes

sasikumar

  • Oct 1st, 2005
 

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() 

  Was this answer useful?  Yes

Satish

  • May 30th, 2007
 


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

  Was this answer useful?  Yes

ganeshjava

  • Nov 25th, 2008
 

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

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions