+

Search Tips   |   Advanced Search

Implement EJB applications that use timers

Use this task when we are implementing EJB applications that use timers.

In WebSphere Application Server, the EJB Timer Service implements EJB Timers as a new Scheduler Service task. By default, an internal (or pre-configured) scheduler instance is used to manage those tasks, and they are persisted to an Apache Derby database associated with the server process. 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. We can also configure and manage the EJB timer service for a specific EJB container


Tasks

  1. Migrate enterprise bean code.

    1. Migrate enterprise bean code to the supported specification.

  2. Develop enterprise beans for the timer service.

    1. In WAS, 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 Apache Derby database associated with the server process.

  3. Assemble EJB modules for enterprise bean applications.

    1. Assemble an EJB module to contain enterprise beans and related code artifacts. Group web components, client code, and resource adapter code in separate modules. After the EJB module is assembled, install it as a stand-alone application or combine it with other modules into an enterprise application.

  4. Deploy the EJB modules.

    1. When we deploy an EJB module, we install that module on a server configured to support deployed modules. Assemble one or more EJB modules, assemble one or more web modules, and assemble them into a Java EE application.

  5. Administer timer services.

    1. We can configure and manage the EJB timer service for a specific EJB container through the WAS administrative console. There are two ways to configure the timer service to share the same database across multiple servers.

  6. Secure EJB 3 applications.

    1. We can protect enterprise bean methods by assigning security roles to them. Before we assign security roles, we need to know which EJB methods need protecting and how to protect them.

  7. Tune EJB applications.

    1. If we use applications that affect the size of the EJB container cache, it is possible that the performance of the applications can be impacted by an incorrect size setting. It is important to know that entity beans are not supported in an EJB 3.0 module. One of the steps in tuning your EJB container to optimum performance levels is to fine-tune the EJB cache.

  8. Troubleshoot EJB 3.x applications.

    1. Use these troubleshooting tips for problems related to accessing enterprise beans.

We have implemented EJB applications that use timers.