Announcement Announcement Module
No announcement yet.
Launch Job from Container triggered by scheduler Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Launch Job from Container triggered by scheduler

    We have a use case to run Spring Batch jobs in Websphere container. I do not know the best practice to make it happen. Our data centre is using control-M and you can assume the scheduler will call a pre-defined shell script (e.g. GenerateReportJob) when the scheduled time is arrived.

    Specifically, my question is:
    - how a shell script command trigger the start of a Spring Batch job retained inside the container?

  • #2
    In the past(Pre-Spring Batch) I have done this by having the script invoke an Application Client, which then kicks off the job as an EJB call, similar to what you see in the following sun article:

    I have also worked with clients that have done something similar using JMX to invoke the batch job as well.


    • #3
      Thanks to your reply. In such a way, I think we can also implement similar by using MDB or Web-Service approach.

      But we have one problem, how to make our application client blocking until the job finished (or stopped / interrupted)? We want to make the client behavior like a traditional command line program, which is blocking until the job finished.


      • #4
        Seems like your client has to do the blocking. You could write your own code to poll a queue or web service for the result. Spring Integration also has some useful stuff (check out RequestReplyTemplate).