-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add a Java job definition API as an alternative to XML #109
Comments
Thanks for opening Reza. I'm interested how batch properties would work with this type of API. E.g. would I be expected to call a setBatchProperty(name,value) for every single artifact that needed a given property or would there be some scoping mechanism involved. One angle I'm interested here in #95. At the moment BatchProperty injection values come via the XML-defined job property scope hierarchy, combined with job parameters passed on the execution start. But maybe some type of property bean with a specified scope would be helpful from both of these angles? |
What we did in batxhee is to generate a jaxb model of the dsl and let it be instantiated programmatically. |
Before addressing this, I think adding generics back to the API would be a pre-req... |
Opened #177 since a job registration mechanism would make this API more useful, but it's probably not a hard dependency. |
Seems we're not going to get to this in 2.1. |
The Batch API currently only supports defining jobs in XML. While this is workable, many developers prefer to provide configuration via Java instead of XML. This alternative is generally more concise, more type-safe and also allows for conditional configuration more easily. Hence, the Batch API should consider adding a Java job definition API as an alternative to XML. Some Batch API implementations already provide this option in non-standard ways.
Reza Rahman
Jakarta EE Ambassador, Author, Blogger, Speaker
Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.
The text was updated successfully, but these errors were encountered: