Bug 4384 - {Job, Step, Chunk}Listeners don't receive enough information
{Job, Step, Chunk}Listeners don't receive enough information
Product: jbatch
Classification: Unclassified
Component: source
: P5 major
: ---
Assigned To: cvignola
Depends on:
  Show dependency treegraph
Reported: 2012-12-03 01:57 UTC by mk111283
Modified: 2013-01-16 15:20 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description mk111283 2012-12-03 01:57:21 UTC
Currently, {Job, Step, Chunk}Listeners do not receive any data about the Job, Step or Chunk on the callback methods.

For example, StepListener is defined as

public interface StepListener {
    public beforeStep() throws Exception;
    public afterStep() throws Exception;

Shouldn't these methods StepContext?

Comment 1 mk111283 2012-12-05 18:59:59 UTC
This may not be an issue if we use CDI for instantiating these Listeners. If we do that, then these listeners can inject the appropriate {Job, Step, Chunk} Context within them. 

I assume the spec will mention this. 

P.S. Marking this as a P5 since other issues are also marked as P5.
Comment 2 cvignola 2012-12-07 00:14:33 UTC
Whether or not you use CDI, the @BatchContext injection will work.  That is a requirement of the spec.  So an implementor can can choose between JSR 299,  JSR330, or their own implementation.