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

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

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

The TaskCreatorBean class implements the TaskCreator Enterprise Java Bean.

See Also:
Serialized Form

Constructor Summary
TaskCreatorBean()
           
 
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 scheduleTask(java.lang.String startInterval, int numberOfRepeats, java.lang.String repeatInterval)
          Method scheduleTask.
 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

TaskCreatorBean

public TaskCreatorBean()
Method Detail

scheduleTask

public void scheduleTask(java.lang.String startInterval,
                         int numberOfRepeats,
                         java.lang.String repeatInterval)
                  throws com.ibm.websphere.scheduler.SchedulerException
Method scheduleTask.

Parameters:
startInterval -
numberOfRepeats -
repeatInterval -
Throws:
com.ibm.websphere.scheduler.SchedulerException

ejbCreate

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

Throws:
javax.ejb.EJBException - Thrown by the method to indicate a failure caused by a system-level error.
javax.ejb.CreateException - thrown if the instance cannot be created

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:
javax.ejb.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:
javax.ejb.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:
javax.ejb.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:
javax.ejb.EJBException - Thrown by the method to indicate a failure caused by a system-level error.