JSR-352: Investigate request limit of job operator from batch runtime in Java SE

Description

Previously, the batch job operator JobOperator can only be requested once from the batch runtime under JBeret SE. If it is requested more than once, an error will be thrown.

1 2 3 4 5 6 7 8 // first call JobOperator jobOperator = BatchRuntime.getJobOperator(); // use jobOperator to operate a job ... // retrieve again, error jobOperator = BatchRuntime.getJobOperator();

Error message:

1 java.util.ServiceConfigurationError: javax.batch.operations.JobOperator: Provider org.jberet.operations.JobOperatorImpl could not be instantiated

This ticket aims to investigate:

  • Is it still the case on the current codebase?

  • Is it a bug from JBeret SE / JBatch SE?

  • Is there any case where BatchRuntime#getJobOperator() need to be called twice?

Environment

None

Status

Assignee

Mincong Huang

Reporter

Mincong Huang

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Priority

Major