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 Thu, 25 Feb 2016 13:48:26 GMT
@Scott: my note was in the original (project) context and not in the spec
context ;)


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-25 14:46 GMT+01:00 Scott Kurz <skurz3@gmail.com>:

> I know it's chime in and mix spec discussion with the original topic... and
> spec is best discussed on jbatch public.
>
> But... real quick.. I think the in/out is still relevant because it allows
> the full range of property substitutions with defaults, override w/ job
> parms, etc.
>
>
>
>
> On Tue, Feb 23, 2016 at 11:28 PM, Romain Manni-Bucau <
> rmannibucau@gmail.com>
> wrote:
>
> > Yep but you can control your listeners with JobContext to skip them or
> not.
> >
> > That said agree having them by job would be easy and nice.
> >
> > Also the good thing with CDI - guess you use it ;) - is the in/out
> property
> > binding is not that relevant since you just pass your state in the
> injected
> > beans (or job context if really needed).
> >
> > Just to give another thought to that: tasks are identified so we could
> > define global listeners with regex:
> >
> > <job id=„myJob“>
> >     <listeners>
> >         <listener ref=„myUserStepListener“ on="stepT.*" /> <!-- stepOne
> > doesn't worth it -->
> >    </listeners>
> >
> >    <step id=„stepOne“>
> >     ….
> >    </step>
> >
> >    <step id=„stepTwo“>
> >     ….
> >    </step>
> >
> >    <step id=„stepThree“>
> >     ….
> >    </step>
> > </job>
> >
> >
> >
> >
> > 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-24 8:20 GMT+01:00 Mark Struberg <struberg@yahoo.de>:
> >
> > > But that would register the listeners for ALL jobs running on this box,
> > > right?
> > > This is great for some infrastructure integration, but you cannot
> define
> > > it per job.
> > > Or even make the job bring his own listeners.
> > >
> > > LieGrue,
> > > strub
> > >
> > > > Am 23.02.2016 um 12:27 schrieb Romain Manni-Bucau <
> > rmannibucau@gmail.com
> > > >:
> > > >
> > > > 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