+

Search Tips   |   Advanced Search

Set a timer service


To configure a timer service, follow these steps.

 

  1. Open the admin console.

  2. Click Servers > Application servers > server_name > EJB Container settings > EJB timer service settings.

    The timer service settings panel is displayed.

  3. To use the internal, or pre-configured, scheduler instance, click the Use internal EJB timer service scheduler instance radio button.

    If we choose not to change the default settings, this instance is associated with a Apache Derby database. If we choose to customize the pre-configured instance:

    1. To change the data source (we can use any supported database, such as DB2 or Oracle), enter the Data source JNDI name.

    2. Enter the chosen Data source alias.

    3. Enter the chosen Table prefix to have several server processes use the same database, but different tables.

    4. Enter a Poll interval value in milliseconds.

    5. If we want more timers to execute concurrently, enter a new value for Number of timer threads.

    See about the fields, see EJB timer service settings

  4. To configure our own scheduler instance instead of using the pre-configured internal one, click the Use custom scheduler instance radio button. Some reasons we might want to use our own instance are:

    • to change scheduler service configuration options not available for customization on this panel

    • to keep EJB Timer tasks in the same database tables as the other tasks

    • we are running in a Clustered environment and want to have a single scheduler instance handle all of the EJB Timers for the cluster. This way, an ejbTimer Task created on one cluster member can execute on a different cluster member.

    To use our own instance, :

    1. Set a scheduler instance through the Scheduler Service GUI. See Use schedulers for information on how to do this.

    2. Select the Scheduler JNDI name from the list.

  5. Click Apply.

  6. Click OK.


Set a timer service for network deployment
Example: Using the Timer Service
EJB timer service settings