Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert PipelineListener call order #280

Closed
mvpcortes opened this issue May 13, 2017 · 7 comments
Closed

Invert PipelineListener call order #280

mvpcortes opened this issue May 13, 2017 · 7 comments
Labels
Milestone

Comments

@mvpcortes
Copy link

mvpcortes commented May 13, 2017

Hello,

I would require a new behavior for 4.2.2 version.

I am using Spring to manager transactions in my batch processing. I need do fine-tuning transactions by programmatic transaction (http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/transaction.html#transaction-programmatic-ptm)

To nested transactions, I need that PipelineListener methods (beforeRecordProcessing, afterRecordProcessing) be called in a certain order. If the pipelines a, b and c are registered in this order, then the beforeRecordProcessing methods should be called in same order (a.beforeRecordProcessing, b.beforeRecordProcessing, c.beforeRecordProcessing), and the afterRecordProcessing should be called in inverse order (c.afterRecordProcessing, b.afterRecordProcessing, a.afterRecordProcessing).

a.beforeRecordProcessing
b.beforeRecordProcessing
c.beforeRecordProcessing
(pipeline processing)
c.afterRecordProcessing
b.afterRecordProcessing
a.afterRecordProcessing

Thanks

mvpcortes added a commit to mvpcortes/easybatch-framework that referenced this issue May 13, 2017
mvpcortes added a commit to mvpcortes/easybatch-framework that referenced this issue May 13, 2017
@fmbenhassine
Copy link
Member

Hello,

Interesting! I think listeners should behave as you suggest.
This change in behaviour cannot be introduced in a patch version (4.2.2). It should be added at least in a minor version like 4.3. But to be honest, we will not put a lot of effort in maintaining v4.x line.

Have you considered migrating to v5? I can help!
I'll consider adding the new behaviour you suggest in v5 too.

Kr
Mahmoud

@mvpcortes
Copy link
Author

mvpcortes commented May 15, 2017

Hi @benas ,
I agree we should not spend effort in v4.x maintaining.

I yet don't try migrate to version 5.x, Next weeks I will.

Thanks by you consider the new behavior for next version. :)

@fmbenhassine
Copy link
Member

Hi @marcosvpcortes

Thank you for both pull requests! I don't know why I was not notified about them..

Please note that 'production' branches cannot receive pull requests, they are updated only by the release process.

As discussed, v4 is obsolete, so I closed the PR related to it.

But the one for v5 is great! I did a quick review and it good to merge.
Could you please rebase on it the master branch and re-submit your PR? I'll include it in v5.2
Also don't hesitate to add your name to the contributors list in the readme.md.

Many thanks for your effort!

Kind regards
Mahmoud

@fmbenhassine fmbenhassine added this to the v5.2.0 milestone Jun 12, 2017
@fmbenhassine
Copy link
Member

Hi @marcosvpcortes

I would like to merge your PR and include it in v5.2.
Could you please re-create your PR on the master branch (instead of production-v5 branch)?
Also don't hesitate to add your name to the contributors list in the readme.md

Kr
Mahmoud

@fmbenhassine
Copy link
Member

Hi @marcosvpcortes

I applied your changes to the master branch and added you to the contributors list.
Thank you very much for your time and effort!

I've deployed v5.2.0-SNAPSHOT with your changes. This feature will go in the upcoming release. Keep tuned 😉

Best regards,
Mahmoud

@mvpcortes
Copy link
Author

Hi @benas,
sorry I cannot do merge my PR in this month... Thanks you for you did it.

Kr,

Marcos Côrtes

@fmbenhassine
Copy link
Member

No worries, it will be included in next release.

Keep tuned 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants