com.ibm.websphere.samples.techsamp.security.jaas.jaasloginejb
Class SampleBeanBean

java.lang.Object
  extended by com.ibm.websphere.samples.techsamp.security.jaas.jaasloginejb.SampleBeanBean
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

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

Bean implementation class for Enterprise Bean: SampleBean. The SampleBean class is a stateless session Enterprise JavaBean (EJB) that returns the caller's security identity. The EJB is secured by a J2EE security role.

See Also:
SampleBean, SampleBeanHome, Serialized Form

Constructor Summary
SampleBeanBean()
           
 
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 ejbRemove()
          A container invokes this method before it ends the life of the session object.
 java.lang.String getCallerInfo()
          Returns the caller's security identity.
 javax.ejb.SessionContext getSessionContext()
          Gets the associated session context.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets the associated session context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleBeanBean

public SampleBeanBean()
Method Detail

getSessionContext

public javax.ejb.SessionContext getSessionContext()
Gets the associated session context.

Returns:
The context for this session.

setSessionContext

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

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

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Executed upon bean instance creation.

No action is required by the SampleBean bean.

Throws:
javax.ejb.CreateException

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 action is required by the SampleBean bean.

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 action is required by the SampleBean bean.

Specified by:
ejbPassivate in interface javax.ejb.SessionBean

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.

No action is required by the SampleBean bean.

Specified by:
ejbRemove in interface javax.ejb.SessionBean

getCallerInfo

public java.lang.String getCallerInfo()
Returns the caller's security identity.

Returns:
the caller's security identity.
Throws:
RemoteException - Thrown if the remote method call fails.