Configure a Timer Service for network deployment

 

Overview

Use this task to configure the EJB Timer Service to be used across multiple servers. This is largely a question of using the same data source. The steps that follow assume that you have already created a database instance (for example, DB2 or Oracle). From there, you must configure the Timer Service to use that database.

There are a couple of ways to configure the Timer Service to share the same database across multiple servers. Steps 1 and 2 below are mutually exclusive. Choose one or the other.

 

Procedure

  1. Configure a scheduler instance for the cluster, then configure the Timer Service to use that scheduler instance.

    1. Configure a scheduler instance for the cluster. This creates for you a custom scheduler instance. Next we need to configure the Timer Service to use that custom instance.

    2. Open the administrative console.

    3. Click Servers >Application Servers > servername > EJB Container Settings > EJB timer service settings. The Timer Service settings panel appears.

    4. Select the Use custom scheduler instance radio button.

    5. Select your Scheduler JNDI name from the dropdown list.

    6. Click Apply.

    7. Click OK.

  2. Configure the Timer Service default scheduler instance for each server to use the same data source.

    1. Select the Use internal EJB timer service scheduler instance radio button. To customize the pre-configured instance:

    2. To change the data source (use any supported database, such as DB2 or Oracle) select your Data source JNDI name from the dropdown list. The default database listed cannot be shared, because it is configured to be visible to one server only, and it uses the single server version of Cloudscape, which can only be accessed by one server process at a time.

    3. Enter your chosen Datasource Alias.

    4. Enter your chosen Table Prefix if you want to have several server processes use the same database, but different tables.

    5. Enter a Poll Interval value in milliseconds. For more information about the fields, see EJB Timer Service settings

    6. Click Apply.

    7. Click OK.

    8. Change all of your server processes to use the same database you chose from the Data source JNDI name dropdown list earlier.


 

Related Tasks


Using schedulers

 

See Also


Example: Timer Service

 

Related Information


EJB Timer Service settings