com.ibm.websphere.samples.beenthere
Class BeenThereBean

java.lang.Object
  extended by com.ibm.websphere.samples.beenthere.BeenThereBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

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

The implementation class for the BeenThere stateless session EJB.

BeenThereBean implements each of the business methods defined in the BeenThere EJB remote interface and each of the EJB lifecycle methods in the javax.ejb.SessionBean interface.

See Also:
BeenThere, BeenThereHome, Serialized Form

Field Summary
static java.lang.String EJB_SERVER_NAME
           
static java.lang.String EJB_SERVER_NODE_NAME
           
static java.lang.String EJB_SERVER_PROCESS_ID
           
 
Constructor Summary
BeenThereBean()
          Creates a new BeenThereBean instance.
 
Method Summary
 void ejbActivate()
          The activate method is called when the instance is activated from its "passive" state.
 void ejbCreate()
          Executed upon bean instance creation.
 void ejbPassivate()
          The passivate method is called before the instance enters the "passive" state.
 void ejbPostCreate()
          Executed after initial bean instance creation.
 void ejbRemove()
          A container invokes this method before it ends the life of the session object.
 java.util.Hashtable getRuntimeEnvInfo()
          Obtains a table that contains the node name, application server name and process ID, of where this EJB is executing.
 void setSessionContext(javax.ejb.SessionContext sessioncontext)
          Sets the associated session context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EJB_SERVER_NODE_NAME

public static java.lang.String EJB_SERVER_NODE_NAME

EJB_SERVER_NAME

public static java.lang.String EJB_SERVER_NAME

EJB_SERVER_PROCESS_ID

public static java.lang.String EJB_SERVER_PROCESS_ID
Constructor Detail

BeenThereBean

public BeenThereBean()
Creates a new BeenThereBean instance.

Method Detail

ejbCreate

public void ejbCreate()
Executed upon bean instance creation.

Obtains execution environment information and populates the table that gets returned to the user when the getRuntimeEnvInfo method is called.


ejbPostCreate

public void ejbPostCreate()
Executed after initial bean instance creation.

No actions need to be taken for BeenThere.


setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessioncontext)
Sets the associated session context. The container calls this method after instance creation.

No actions need to be taken for BeenThere.

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sessioncontext - Specifies the context for this session.

ejbRemove

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

Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbActivate

public void ejbActivate()
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.

No actions need to be taken for BeenThere.

Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
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.

No actions need to be taken for BeenThere.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean

getRuntimeEnvInfo

public java.util.Hashtable getRuntimeEnvInfo()
Obtains a table that contains the node name, application server name and process ID, of where this EJB is executing.

Returns:
A table that contains execution environment information for this EJB.