batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Kurz <sku...@gmail.com>
Subject Re: JobLevel Listeners
Date Tue, 23 Feb 2016 13:42:53 GMT
Interesting idea to add to the spec.

Useful but seems straightforward enough to consider.

If you'd like to raise it as a spec issue, pleaes do: OpenNewSpecIssue
<https://github.com/WASdev/standards.jsr352.batch-spec/wiki/OpenNewSpecIssue>

(One thing to keep in the back of my mind:   The ability to configure
"output" props
https://java.net/bugzilla/show_bug.cgi?id=7475
would force us to consider late binding of props.. so you could imagine a
case where the same step
listener gets different prop values because of this.
I'm just thinking out loud.)

Thanks,
Scott

On Tue, Feb 23, 2016 at 3:27 AM, Romain Manni-Bucau <rmannibucau@gmail.com>
wrote:

> org.apache.batchee.step.listeners.before and
> org.apache.batchee.step.listeners.after?
>
>
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2016-02-23 12:20 GMT+01:00 Reinhard Sandtner <reinhard.sandtner@gmail.com
> >:
>
> > Hey folks,
> >
> > i’m currently struggling with listeners ;-)
> >
> > i have a batch-job with various numbers of steps…
> > i need a stepScopeListener and an itemWriteListener for all steps in this
> > job
> >
> > wouldn’t it be a good idea to be able to do something like
> >
> > <job id=„myJob“>
> >     <listeners>
> >         <listener ref=„myUserStepListener“ /> <!— just to get the
user in
> > a thread local —>
> >         <listener ref=„myItemWriterListener“ /> <!— just to get my
> > ConstraintViolationException printed with the right message —>
> >    </listeners>
> >
> >    <step id=„stepOne“>
> >     ….
> >    </step>
> >
> >    <step id=„stepTwo“>
> >     ….
> >    </step>
> >
> >    <step id=„stepThree“>
> >     ….
> >    </step>
> > </job>
> >
> > i know the spec says only JobListeners can be specified as a job level
> > listener but we could add a property to enable this feature.
> > and of course i know its possibly to specify a listener via
> > batchee.properties globally for all batch jobs. but i need it only  for a
> > number of batch jobs and not globally.
> >
> > with the current implementation i’ve to define my listener separately for
> > each step… it’s not that bad but define my listeners once would be easier
> > in this case.
> >
> > wdyt?
> >
> > lg
> > reini
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message