com.ibm.websphere.samples.scheduler.accountreportejb
Class ReportGeneratorBean

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

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

Implements the ReportHandler Enterprise Java Bean. The ReportHandler EJB is a TaskHandler session bean which is the target of a scheduled task.

See Also:
Serialized Form

Constructor Summary
ReportGeneratorBean()
           
 
Method Summary
 void ejbActivate()
          A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object.
 void ejbCreate()
          A container invokes this method when it creates the EJB object
 void ejbPassivate()
          A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object.
 void ejbRemove()
          A container invokes this method before it removes the EJB object that is currently associated with the instance.
 void process(com.ibm.websphere.scheduler.TaskStatus status)
          Accumulates the current account balances and inserts a row into the report table.
 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
 

Constructor Detail

ReportGeneratorBean

public ReportGeneratorBean()
Method Detail

process

public void process(com.ibm.websphere.scheduler.TaskStatus status)
Accumulates the current account balances and inserts a row into the report table. This method is called whenever the scheduled task runs.

Parameters:
status - The current status of the task. This parameter is ignored.

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
A container invokes this method when it creates the EJB object

Throws:
EJBException - Thrown by the method to indicate a failure caused by a system-level error.
javax.ejb.CreateException

ejbActivate

public void ejbActivate()
A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object.

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

ejbPassivate

public void ejbPassivate()
A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object.

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

ejbRemove

public void ejbRemove()
A container invokes this method before it removes the EJB object that is currently associated with the instance.

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

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Set the associated session context.

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