EJB timer service settings
To configure the EJB timer service for a specific EJB container...
Servers > Server types > WebSphere application servers > server > EJB Container Settings > EJB timer service settings
The radio buttons for the internal EJB timer service scheduler instance and the custom scheduler instance offer you choices that are mutually exclusive.
- Use internal EJB timer service scheduler instance
WAS ND v7.0 provides an internal scheduler instance for use by the EJB timer service. The internal scheduler instance is pre-configured for basic EJB timer functionality, and provides limited settings for an EJB timer service.
Clicking this button specifies to use the internal scheduler instance to manage the tasks. They are persisted to a Cloudscape database associated with the server process. Selecting this choice locks out the Use Custom Scheduler Instance option.
This is the default choice.
- Use custom scheduler instance
We can perform a more advanced configuration for the EJB timer service by defining a custom scheduler instance.
Scheduler configuration provides more configuration options than the internal EJB timer service pre-configured scheduler instance.
We might want to define a custom scheduler instance when running in a clustered environment, allowing all cluster members to run with a single scheduler instance. This enables EJB Timers created on one cluster member to execute on other cluster members. Providing a custom scheduler instance also enables EJB Timers to be maintained in the same database as other scheduled tasks. Selecting this choice locks out the Use Internal EJB Timer Service Scheduler Instance option.
- Data source JNDI name
JNDI name of the data source where persistent EJB Timers are stored for this EJB container. Any data source available in the name space can be used for EJB Timers. Multiple EJB containers can share a single data source while using different tables by specifying a table prefix.
Data type String Default jdbc/DefaultEJBTimerDataSource
- Data source alias
Authentication alias to a user name and password used to access the data source.
Data type String
- Table prefix
A string prepended to the EJB timer service table names (TASK, TREG, LMGR and LMPR). These tables are created during server start if they do not already exist. See help on the Scheduler Service for information about manually creating these tables. Multiple independent EJB timer services can share the same database if each instance specifies a different prefix string.
Data type String Default EJBTIMER_
- Poll interval
The interval at which the EJB timer service daemon polls the database. Each poll operation can be expensive. If the interval is extremely small and there are many scheduled tasks, polling can consume a large portion of system resources. New Timers set to expire sooner than this interval might not execute until the interval ends. If this value is too large, a potentially large number of timer events might be read into memory, because all the timer events occurring in the next poll interval are read in each time.
Data type Integer Units seconds Default 300 Range 3 -- 1800
- Number of timer threads
The number of threads used to execute concurrent EJB Timer tasks. Setting the number of Timer Threads to zero disables the EJB timer service.
Data type Integer Default 1 Range 0 -- 500
- Scheduler JNDI name
This field is only used when the Use Custom Scheduler Instance choice is made. It specifies the JNDI name of a custom Scheduler instance to use for managing and persisting EJB Timers. Internal EJB timer service Scheduler Instance configuration information is not applied to the specified Scheduler instance.
Data type String
Related tasks
Set a timer service for network deployment
Set a timer service
Related
Example: Using the Timer Service with the TimedObject interface