When defining an application scheduler in the server configuration,
the object instance is bound into the global name space under the configured
Java Naming Directory Interface (JNDI) name. Use a resource reference to avoid
manually coding this JNDI name into your application. Using a resource reference
allows administrators to map applications to the appropriate application schedulers.
Before you begin
An alternative is to create a scheduler resource reference by editing
the XML directly. An application scheduler resource reference is a Java 2
Platform Enterprise Edition (J2EE) compliant resource that uses the class
com.ibm.websphere.scheduler.Scheduler as
the object type. For information regarding the XML file format, see the J2EE
Specification.
Draft comment:
Xref here for J2EE spec.
Why and when to perform this task
To create an application scheduler resource reference, follow these
steps.Steps for this task
- Start an assembly too (xref here)l, such as Application Server
Toolkit or Rational Web Developer.
- Open the J2EE perspective.
- Open your EJB or Web module with the Deployment Descriptor Editor.
- Click the Reference tab at the bottom of the window.
- Click Add.
- Select the Resource reference option.
- Click Next.
- Complete the Reference fields as shown in the following properties:
- NameThe reference name, for example, sched/MyScheduler.
According to this example, the name you choose has a local reference name
of java:comp/env/sched/MyScheduler.
- TypeSelect com.ibm.websphere.scheduler.Scheduler,
and click OK.
- AuthenticationSelect container.
Draft comment:
Does
this still happen?
- DescriptionAny relevant description.
- Click Finish.
- (Optional) Enter a global JNDI name of a configured scheduler
in the JNDI name field in the Bindings section of the Reference window.
You can specify or override this value when you install the application.
- Save your changes to the deployment descriptor.
Result
A scheduler resource reference is now available to use within your
application.
What to do next