Bug 4198

Summary: use of JobOperatorFactory SPI unclear
Product: jbatch Reporter: ScottKurz
Component: sourceAssignee: cvignola
Status: CLOSED FIXED    
Severity: minor CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Whiteboard:

Description ScottKurz 2012-10-10 16:43:23 UTC
Trying to understand your vision for Launcher leading to a @JobOperator injection.

In Sec. 7.8 you have:

> In a Java SE environment,  the @JobOperator annotation is resolved in this class and in this class alone. If a batch artifact factory SPI is configured (see 6.7) a single call is made to the factory with a ref name of "System.JobOperator" to create the JobOperator instance.  The factory must return an instance of type javax.batch.spi.ArtifactFactory.  

Did you mean to end with:

"The factory must return an instance of type javax.batch.spi.JobOperatorFactory"?

If that's the case then is the flow?: 

1. user runs Launcher main with JobOperator client w/ @JobOperator (field?/setter?)

2. runtime impl calls BatchArtifactFactory SPI impl 
  baf.create("System.JobOperator")  // return JobOperatorFactory

3. runtime impl calls getInstance on returned JobOperatorFactory impl
   job.getInstance() 

4. runtime injects returned value into @JobOperator

------------------------------------------------------------------------------
 
Is that the correct interpretation?  Or had you envisioned something different?
Comment 1 cvignola 2012-10-10 17:05:23 UTC
I think maybe we don't need this in the spec.  What we're trying to do is resolve @JobOperator in an SE environment.  Maybe this is only an implementation concern.
Comment 2 cvignola 2013-01-16 16:35:31 UTC
the SPI has been dropped