+

Search Tips   |   Advanced Search

Set a timer service for network deployment


Use this task to configure the EJBs 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 we have already created a database instance (for example, DB2 or Oracle). From there, configure the timer service to use that database.

There are two ways to configure the timer service to share the same database across multiple servers. Choose either step 1 or 2.

 

  1. Set 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 admin 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 the Scheduler JNDI name from the dropdown list.

    6. Click Apply.

    7. Click OK.

  2. Set 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 (we can use any supported database, such as DB2 or Oracle) select the 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 Apache Derby, which can only be accessed by one server process at a time.

    3. Enter the chosen Datasource Alias.

    4. Enter the chosen Table Prefix 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 the server processes to use the same database you chose from the Data source JNDI name dropdown list earlier.

 

Related tasks


Use schedulers

 

Related


Example: Using the Timer Service

 

Related information


EJB timer service settings