Results 1 to 3 of 3

Thread: Retrieving JobExecution Status on RuntimeException

  1. #1
    Join Date
    Oct 2004
    Posts
    16

    Default Retrieving JobExecution Status on RuntimeException

    If I am launching a job:

    Code:
    try {
    JobExecution je = launcher.run(job, jp);
    } catch (Throwable t) {
    // my job execution is null...
    }
    and a RuntimeException is thrown the JobExecution is null since the launcher did not return successfully.

    How do I access the 'real' job execution metadata from the failed job?

    Thanks

    Franz Garsombke

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    You can launch the job asynchronously by injecting a TaskExecutor in the job launcher. Then you have the job execution immediately.

  3. #3

    Default

    Hi Franz,

    I have stumbled on the same problem, as you posted here. Can you tell me if you solved it by using an asynchronous TaskExecutor ? Can you post a couple of lines of code / config on how you did it ?

    Are there any drawback to choosing this solution ?

    Best regards
    Preben

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •