Creating a scheduler resource reference

When you define schedulers in the server configuration, the object instance is bound into the global name space under the configured Java Naming Directory Interface (JNDI) name. You can 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 schedulers.

About this task

You can alternatively create a scheduler resource reference by editing the XML directly. A 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.

Procedure

  1. Start an assembly tool, such as Application Server Toolkit or Rational Application Developer.
  2. Open the J2EE perspective.
  3. Open your EJB or Web module with the Deployment Descriptor Editor.
  4. Click the Reference tab at the bottom of the window.
  5. Click Add.
  6. Select the Resource reference option.
  7. Click Next.
  8. Complete the Reference fields as shown in the following properties:
    Name
    The 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.
    Type
    Select com.ibm.websphere.scheduler.Scheduler, and click OK.
    Authentication
    Select container.
    Description
    Any relevant description.
  9. Click finish.
  10. (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.
  11. Save your changes to the deployment descriptor.

Results

A scheduler resource reference is now available to use within your application



In this information ...


Related tasks
Related reference

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 7:21:45 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-nd-dist&topic=tsch_resourceref
File name: tsch_resourceref.html