-
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
Define job registration mechanism with Java-defined job (e.g. at app startup?) #177
Comments
I think the same API can be used for both purely dynamic configuration and registration during application startup, if a configuration object is passed to a CDI bean at application startup and could be also passed to a method that defines the job dynamically. With a CDI bean, a job could be defined with e.g. a CDI event as follows (as described by @rmannibucau here):
The CDI event would be fired at application startup, only once. This would be similar as when job is defined in a XML, which is also evaluated at startup. And the same job definition could be applied on an instance of a
The
|
If you make it a bean instead of an event it will remove the indirection in the API:
and
Then no need to change JobOperator#start method signature since the job is named anyway (required to keep job operator reporting features). |
Seems we're not going to get to this in 2.1. |
Though a Java-defined job (as discussed in #109 ) could define jobs on a purely dynamic basis, (define then immediately start), it also could be useful to provide a registration mechanism so they could be registered, and then later started by name, e.g. via JobOperator.start(String jobName, ...), (though not necessarily required to close #109).
Some ideas around this were discussed in ML thread: https://www.eclipse.org/lists/jakartabatch-dev/msg00147.html.
Since there was clearly some interest in this proposal, I'm opening this issue to track further work and discussion, and adding for now to the 2.1 milestone.
The text was updated successfully, but these errors were encountered: