Rakesh API

biz.wedoit4u.ejb.session
Class SessionBeanAdapter

java.lang.Object
  extended by biz.wedoit4u.ejb.session.SessionBeanAdapter
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean
Direct Known Subclasses:
DatabaseActionBean, DateFormatterBean

public class SessionBeanAdapter
extends java.lang.Object
implements javax.ejb.SessionBean

An adapter class that provides empty implementation for all the methods specified in the SessionBean interface.

Version:
$Id: SessionBeanAdapter.java,v 1.3 2004/05/26 11:42:36 rakesh Exp $
Author:
Rakesh Vidyadharan 20th September 2003

Copyright 2003, wedoit4u.biz

See Also:
Serialized Form

Field Summary
protected  javax.ejb.SessionContext sessionContext
          An instance variable that holds a reference to the associated session context.
 
Constructor Summary
SessionBeanAdapter()
           
 
Method Summary
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreate()
          Dummy implementation of a create method.
 void ejbPassivate()
          The passivate method is called before the instance enters the "passive" state.
 void ejbRemove()
          A container invokes this method before it ends the life of the session object.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Set the associated session context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionContext

protected javax.ejb.SessionContext sessionContext
An instance variable that holds a reference to the associated session context.

Constructor Detail

SessionBeanAdapter

public SessionBeanAdapter()
Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException
Set the associated session context. The container calls this method after the instance creation. This references is stored in the sessionContext instance variable.

This method is called with no transaction context.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - - A SessionContext interface for the instance.
Throws:
javax.ejb.EJBException - - Thrown by the method to indicate a failure caused by a system-level error.

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException
A container invokes this method before it ends the life of the session object. This happens as a result of a client's invoking a remove operation, or when a container decides to terminate the session object after a timeout.

This method is called with no transaction context.

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException - - Thrown by the method to indicate a failure caused by a system-level error.

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException
The activate method is called when the instance is activated from its "passive" state. The instance should acquire any resource that it has released earlier in the ejbPassivate() method.

This method is called with no transaction context.

Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException - - Thrown by the method to indicate a failure caused by a system-level error.

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException
The passivate method is called before the instance enters the "passive" state. The instance should release any resources that it can re-acquire later in the ejbActivate() method.

After the passivate method completes, the instance must be in a state that allows the container to use the Java Serialization protocol to externalize and store away the instance's state.

This method is called with no transaction context.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException - - Thrown by the method to indicate a failure caused by a system-level error.

ejbCreate

public void ejbCreate()
               throws javax.ejb.EJBException
Dummy implementation of a create method.

Throws:
javax.ejb.EJBException

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan