PDA

View Full Version : Poor man's pipeline



wytten
Dec 17th, 2007, 10:07 AM
I wanted to have multiple steps all act upon the same object, so I searched this forum for "chaining" and came across a thread that says this kind of thing ("Pipelines") is not explicitly supported in 1.0.

So I devised a PipelineItemProvider that can be wired to accept an object from step 1 and provide it to step 2: A simple holder that implements the ItemProvider interface.

What happens when I test this toy is that the effect of step 1 is committed via Hibernate but the effect of step 2 is not committed.

I know this is a real sketchy description, but I wonder if you can tell me if there's a better way, or if you think you may know why step 2 is not being committed.

Cheers

wytten
Dec 17th, 2007, 01:59 PM
That approach was flawed in other, more serious ways but happily I discovered CompositeItemProcessor...I figured there had to be something like that, it just took me a while to find it.

robert.kasanicky
Dec 18th, 2007, 02:51 AM
You may also want to look at TransformerWriterItemProcessor and (Composite)ItemTransformer, these are designed for implementing chaining.