Announcement Announcement Module
Collapse
No announcement yet.
Retrieving JobExecution Status on RuntimeException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    You can launch the job asynchronously by injecting a TaskExecutor in the job launcher. Then you have the job execution immediately.

    Comment


    • #3
      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

      Comment

      Working...
      X