High Quality JMS Messaging.

Job Scheduling

How to schedule static Applications

The JMS Application Container registers a jobs in job group "JAC" at the Scheduler Swiftlet:

These jobs can be scheduled via the Scheduler Swiftlet to run at specific times or in intervals, based on calenders and so on.

Application Invoker

The Application Invoker job invokes a static JMS application which name must be specified as a job parameter. It requires that the static JMS application has a shutdown method defined, otherwise the job cannot stop it. Either the JMS application must have the attribute "main-return-is-stop" set to true (SwiftMQ 5.0.0 and above) or a maxmimum run time must be specified in the schedule, otherwise the job runs forever.

The implementation of the Application Invoker job is quite simple. It sets the "enabled" attribute to "true" on job start and to "false" on job stop. Therefore, a static JMS application which should run as a job should be disabled initially.

Parameter Mandatory Description
Application Name Yes Name of the static JMS application.

The following is an example of a schedule "Order Processor" which runs the static JMS application "orderproc" between 1st February 2003 and 30th April 2003 on every business day (Calendar "Business Days") at 10:00, 14:00, and 20:00 and stops it after 30 minutes runtime (thus, at 10:30, 14:30, 20:30):

How to schedule Hot Deploy Applications

To schedule a hot deploy application is quite easy: Just add a "schedule" element to the deployment descriptor:

      <deployment-descriptor>
        <main-class>TestPublisher</main-class>
        <main-class-arguments>
          smqp://intravm/timeout=10000 IVMTopicConnectionFactory testtopic 1000000
        </main-class-arguments>
        <shutdown-method-name>stop</shutdown-method-name>
        <main-return-is-stop>true</main-return-is-stop>
        <schedule time-expression="start 10:00 stop 17:00 delay 10m"
            date-to="2003-11-20"
            logging-enabled="true"/>
        <system-properties>
          <system-property name="someprop" value="someval"/>
        </system-properties>
      </deployment-descriptor>

A schedule is created dynamically at the Scheduler Swiftlet during the deployment and deleted during the undeployment so the elements of the schedule are the same as you have to specify for schedules of the Scheduler Swiftlet. For further infos please take a look there.