batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: JobLevel Listeners
Date Tue, 23 Feb 2016 11:27:22 GMT
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