Bug 4352

Summary: Any point to 7.6.8 BatchRuntime.getJobOperator()?
Product: jbatch Reporter: ScottKurz
Component: sourceAssignee: cvignola
Severity: normal CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: PC   
OS: Windows   

Description ScottKurz 2012-11-20 16:22:47 UTC
How does this help clarify how to get the JobOperator?

Either it needs more detail or should be removed altogether and the JobOperator left as an interface. 

Perhaps you could say something like: 

"A recommended approach for a Java SE-based implementation is to use the java.util.ServiceLoader mechanism for loading an instance of

Or maybe the extra wrapper is unnecessary and just say a recommended approach is to use ServiceLoader to load JobOperator directly.

I'd vote NOT to require it though.. but we could do it in the RI for SE.
Comment 1 cvignola 2012-12-06 20:30:33 UTC
There needs to be a portable means in the programming model for an application to obtain a reference to a JobOperator.  The spec proposes a factory pattern, which will work for both SE and EE: 

public class Batch { 
     public static JobOperator getJobOperator(); 

That is the contract.  The spec implementor must supply an implementation of that class/method that returns a JobOperator.  How the implementor does that is discretionary.