2 Verifying the Oracle Enterprise Scheduler Installation

This chapter describes how to ensure that Oracle Enterprise Scheduler has been correctly installed.

This chapter includes the following sections:

2.1 Introduction to Verifying the Oracle Enterprise Scheduler Installation

The Oracle Enterprise Scheduler health check enables verifying the Oracle Enterprise Scheduler installation using a web browser. The health check web page submits a simple scheduled job so as to verify that Oracle Enterprise Scheduler works as it should.

2.2 How to Verify the Oracle Enterprise Scheduler Installation Using a Browser

Access the Java health check servlet in a web browser. Access to the health check page is available only to users with administrator privileges.

To verify the Oracle Enterprise Scheduler installation:

  1. In a web browser, enter the following URL:

    http://<hostName>:<port>/EssHealthCheck/checkHealth.jsp
    

    where hostName is the server to which Oracle Enterprise Scheduler is installed and port is the port number.

    To verify an Oracle Enterprise Scheduler cluster, use the following URL:

    http://<hostName>:<port>/EssHealthCheck/diagnoseHealth.jsp
    

    The Oracle Enterprise Scheduler Diagnostic Health Check page displays, as shown in Figure 2-1.

    Figure 2-1 Diagnostic Health Check Page

    Diagnostic Health Check Page
  2. Log in to the diagnostic servlet using an Oracle WebLogic Server administrator username and password.

  3. Click the Check Health button to verify the installation.

2.3 How to Programmatically Verify the Oracle Enterprise Scheduler Installation

Programmatically access the health check servlet from your application. Access to the health check page is available only to users with administrator privileges.

To programmatically verify the Oracle Enterprise Scheduler installation:

  1. Access the following URL:

    http://<hostName>:<port>/EssHealthCheck/checkHealth
    

    where hostName is the server to which Oracle Enterprise Scheduler is installed and port is the port number.

  2. Use the HTTP response codes to gauge the health of the Oracle Enterprise Scheduler installation, as shown in Table 2-1.

    Table 2-1 HTTP Response Codes

    Response Code
    Oracle Enterprise Scheduler
    Status Code
    Comments

    200(OK)

    Oracle Enterprise Scheduler is up and running.

    The test job has been submitted and has succeeded within the default duration.

    202(ACCEPTED)

    Oracle Enterprise Scheduler is up and running but a delay in processing has occurred.

    A value of 202 (SC_ACCEPTED) indicates to the client that the request is being acted upon but processing is not yet complete.

    The test job has been submitted but has failed to complete within the default duration.

    500 (INTERNAL_SERVER_ERROR)

    The Oracle Enterprise Scheduler installation has errors.

    An error has occurred during the submission or execution of the job.


2.4 What Happens When You Verify the Oracle Enterprise Scheduler Installation

The health check mechanism consists of an ESSHealthcheck servlet that extends HttpServlet. The metadata and packaging dependencies are the same as that of the web service approach.

Metadata services are used to retrieve metadata objects such as job type and job definition. The required metadata files are EssHealthcheckJobType.xml and EssHealthcheckJobDefinition.xml. These are packaged as ess-app-meta.mar, which must itself be packaged with the file eas-app.ear. The servlet, archived as ess-health-check.war, accesses the runtime metadata in order to schedule the job.

Note:

Make sure to properly configure the file adf-config.xml so as to register all metadata with the repository.

Example 2-1 illustrates the structure of the files ess-app.ear, ess-ejb.jar, and ess-app-meta.mar.

Example 2-1 The Structure of the Health Check Files

ESS-APP.EAR
|  |
|  |__APP-INF/classes/META-INF/ESSWebService.wsdl
|__ess-ejb.jar
|__ess-mbeans.war
|__ess-ws.war
|__ess-ra.rar |
|__ess-health-check.war
    |__WEB-INF
         |__web.xml
         |__weblogic.xml
         |__classes/oracle/ess/healthcheck/view/EssHealthcheckServlet.class
         |__classes/oracle/ess/healthcheck/view/EssConsoleServlet.class
         |__classes/oracle/ess/healthcheck/view/EssClusterHealthcheckServlet.class
         |__checkHealth.jsp 
         |__diagnoseHealth.jsp
         |__essVersion.jsp

ESS-EJB.JAR
Along with the existing set of files, oracle/ess/healthcheck/core/EssHealthcheckJob.class is added to the ess-ejb.jar.

ESS-APP-META.MAR

oracle/as/ess/essapp/internal/WorkAssignment/ESSInternalWA.xml
oracle/as/ess/essapp/internal/Workshift/ESSInternalWS.xml
oracle/as/ess/essapp/healthcheck/Jobs/EssHealthcheckJobDefn.xml
oracle/as/ess/essapp/batchdelete/Jobs/BatchDeleteJob.xml
oracle/as/ess/essapp/healthcheck/JobType/EssHealthcheckJobType.xml
oracle/as/ess/essapp/batchdelete/JobType/BatchDeleteJobType.xml

The health check servlet schedules a trivial job with Oracle Enterprise Scheduler as part of an HTTP request. After a few seconds, the servlet calls RuntimeServiceBean.getRequestState() to check the status of the job and constructs a response message within the servlet code. The servlet then returns a response indicating the success or failure of the job.

2.5 What Happens at Runtime: How the Oracle Enterprise Scheduler Installation is Verified

The servlet waits for the job to either reach a terminal state, or run for 10 seconds, whichever occurs first.

  • If the job reaches a terminal state in less than 10 seconds, the job results in a state of success.

  • If the job's terminal state does not change within 10 seconds, the job results in a state of success. However, the job is listed as not having been executed. This is because the system may be overloaded such that executing the job may take some time.

  • If any problems occur when submitting or executing the job, the job results in a state of failure.

When checking the health of a single node or cluster, the processor specific to the server where the health check is submitted processes the health check request. This is achieved through a system property called SYS_requestedProcessor. For more information about system properties, see the table in the section "Creating or Editing a Job Set" in the chapter "Managing the Work of Oracle Enterprise Scheduler Jobs" in Oracle Fusion Middleware Administrator's Guide for Oracle Enterprise Scheduler.