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

  • Is JobExecution serializable?

    The short query is as titled. The background is as follow.

    We are exploring to launch a job remotely (or inside container). The strategy we are thinking is to implement a job launcher and injected into CommandLineJobRunner.

    In CommandLineJobRunner:
    JobExecution jobExecution =, jobParameters);
    return exitCodeMapper.intValue(jobExecution.getExitStatus ()

    In our JobLauncher: {
    send a message to container
    container's MDB launch a job by SimpleJobLauncher (like the ordinary job launching)
    MDB wait until the job completed and collect the status
    MDB serialize the returned JobExecution object to a message to reply to requesting client.

    To make this strategy perfect, it requires JobExecution is Serializable. Although, we can accept to return only 'useful' parameters (or only serializable params). Right now we can see only ExitStatus is required, for the use of ExitCodeMapper.

    How do you comment this startegy?

  • #2
    The simple answer is yes. JobExecution is Serializable and your outlined usecase looks OK at glance. If I remember correctly there were people on the forum using messaging to launch batch jobs in the past, so I suppose it works fine.