Announcement Announcement Module
No announcement yet.
SimpleAsyncTaskExecutor Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SimpleAsyncTaskExecutor

    In spring batch ref doc 4.3.1, it promote to use SimpleAsyncTaskExecutor on http request. In this case jobLauncher will return a JobExecution immediately with status UNKNOWN.

    I would like to is there any way to get the exit code , if a shell script(shell script is scheduled) invokes the http request and it is expecting the job exit-code back (in asynchronous mode)?

    (I am using asynchronous mode here because, the same http request can be used to stop the running job based on http input value. I have a singleton class which launch the job and return the JobExecution.)

  • #2
    Your servlet has to hang onto the JobExecution so another request can query it. In 2.0 there is a JobOperator interface to encapsulate this through access to the database.


    • #3

      If one record is skipped as per the skipLimit and retryLimit configurations specified in job.xml and job executed completely, is there any way to process the skipped records on next run of the job?


      • #4
        The only way to accomplish that is either a process indicator flag on the data itself, or logging out the skipped records to another table and reading them later.


        • #5
          I will not be able to add a status column in the table.
          Copying skipped records into some temporary table can also be failed.
          Would you please suggest me a solution in this scenario?


          • #6
            Copying skipped records into some temporary table can also be failed.
            I don't understand what you mean by this?