WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

Developing Enterprise JavaBeans 2.1 for the timer service

About this task

In WebSphere Application Server, the EJB Timer Service implements EJB Timers as a new kind of Scheduler Service task. By default, an internal (or pre-configured) scheduler instance is used to manage those tasks, and they are persisted to a Cloudscape database associated with the server process.

However, you can perform some basic customization to the internal scheduler instance. For information about how to do this customization, see Configuring a Timer Service .

Creation and cancellation of Timer objects are transactional and persistent. That is, if a Timer object is created within a transaction and that transaction is later rolled back, the Timer object's creation is rolled back as well. Similar rules apply to the cancellation of a Timer object. Timer objects also survive across application server shutdowns and restarts.

Procedure

  1. Write your enterprise bean to implement the javax.ejb.TimedObject interface, including the ejbTimeout() method. The bean calls the EJBContext.getTimerService() method to get an instance of the TimerServiceobject. The bean calls the TimerService method to create a Timer. This Timer is now associated with that bean.
  2. After you create it, you can pass the Timer instance to other Java code as a local object.
    Note: For WebSphere Application Server Version 6, no assembly tooling supports the Enterprise JavaBeans timedObject. To set the ejbTimeout method transaction attribute you must manually enter the attributes in the deployment descriptor. See EJB Timer Service settings for more information.



Sub-topics
Clustered environment considerations for timer service
Related tasks
Configuring a Timer Service for network deployment
Related reference
Example: Using the Timer Service
Related information
EJB Timer Service settings
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tejb_timerserviceejb.html

© Copyright IBM Corporation 2004, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)