Configure a Timer Service
To configure a timer service, follow these steps.
Procedure
- Open the console.
- Click Servers >Application Servers > servername > EJB Container Settings > EJB timer service settings. The Timer Service settings panel is displayed.
- To use the internal, or pre-configured, scheduler instance, click the Use internal EJB timer service scheduler instance radio button. If you choose not to change the default settings, this instance is associated with a Cloudscape database. If you choose to customize the pre-configured instance:
- To change the data source (you can use any supported database, such as DB2 or Oracle), enter your Data source JNDI name.
- Enter your chosen Data source alias.
- Enter your chosen Table prefix if you want to have several server processes use the same database, but different tables.
- Enter a Poll interval value in milliseconds.
- If you want more timers to execute concurrently, enter a new value for Number of timer threads.
For more information about the fields, see EJB Timer Service settings
- To configure your own scheduler instance instead of using the pre-configured internal one, click the Use custom scheduler instance radio button. Some reasons you might want to use your 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 your other tasks
- you 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 your own instance, :
- Configure a scheduler instance through the Scheduler Service graphical user interface. See Use schedulers for information on how to do this.
- Select your Scheduler JNDI name from the list.
- Click Apply.
- Click OK.
Configure a Timer Service for network deployment
Example: Using the Timer Service
EJB Timer Service settings