-
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
Provide well-defined behavior / ordering / etc. in case where ServiceLoader finds >1 JobOperator impl. #193
Comments
We could also add to JobOperator a A side note is that if the job operator is in a CDI application, we must pick the CDI beans since we enable the operator to be decorated/intercepted so maybe we should also try CDI first - and in CDI a single bean can match so we would be good by design (= if it is ambiguous, user would already have done the job to pick the right one in CDI). Just throwing ideas, not yet sure which one is good or not. Think I still think the fail fast is the best compromise. |
I believe it would be useful to have a way to control which implementation is selected. Priority seems the best way to do it (and already used in other places across the platform). |
(still thinking out loud) but actually all spec which can be selected - ie where it is not contextual as CDI EE, Servlet, JNDI or EJB can be - have a provider method in the lookup entrypoint so it means it is more about adding note that the standard lookup strategy is also to
|
Just want to reiterate that this is NOT currently planned for 2.1. (See the 2.1 / EE 10 milestone: https://github.com/eclipse-ee4j/batch-api/milestone/1) |
In the BatchRuntime.java implementation we now simply return the first JobOperator found (see here).
We could do something like failing fast if we find >1.
Other ideas?
The text was updated successfully, but these errors were encountered: