Sample Application Using Timer API (CommonJ) to Configure Timer Based Tasks in Oracle WebLogic Cluster 10.3.X
(Doc ID 1614886.1)
Last updated on JUNE 28, 2024
Applies to:
Oracle WebLogic Server - Version 10.3.6 and laterInformation in this document applies to any platform.
Goal
The purpose of this sample code is to illustrate the usage of the Timer and WorkManager API (also known as the CommonJ API) to be able to schedule tasks in the context of a WebLogicServer cluster, so that the task is executed once and only once when the timer expires, provided the HA capabilities of a WLS cluster.
Most of the information in this article is taken from available online documentation which should be used as primary source of information: see Oracle® Fusion Middleware Timer and Work Manager API (CommonJ) Programmer's Guide for Oracle WebLogic Server 11g Release 1 (10.3.6) Part Number E13733-05.
DISCLAIMER
The sample program in this article is provided for educational purposes only and is NOT supported by Oracle Support Services. Oracle cannot guarantee that it will work in all cases, so be sure to test it relying on it.
NOTE: All the package names; server names; JNDI names; DataSource names; Class names; and attribute Names (example: jobtests; mytestListener ; ms1; ms2, jobSchedulerDS ; etc) and all others used in article and attached "mytestListener_jar.jar" "jobTestsProject.war"- represent fictitious sample names that made up as example. Any similarity to actual code, is purely coincidental and not intended in any other manner.
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |
Requirements |
Configuring |
Instructions |
Sample Code |
Sample Output |