Comments (4)
We could also add to JobOperator a default int priority() {return 1000;}
and sort them. Implementations must use 1000 but users could wrap any operator and use something higher to force the selection. If multiple higher priority operators are there we fail else we pick it.
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.
from batch.
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).
from batch.
(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 BatchRuntime.getJoboperator(String provider)
than anything else probably (using as ref bval, cdi se, jsonb, jsonp, jpa but others have alternate mecanism like JAXRS, JSF, ...).
note that the standard lookup strategy is also to
- if explicit in parameters use it
- check a spec system property
- (optional) check a
lib/<file>.properties
- use service discovery (loader these days)
from batch.
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)
from batch.
Related Issues (20)
- Define job registration mechanism with Java-defined job (e.g. at app startup?) HOT 3
- Batch TCK separation and integration with Platform TCK HOT 1
- Add module-info.java HOT 2
- Clarify precedence between runtime-provided JobOperator Bean vs. other (app)-provided HOT 1
- Final update for Batch 2.1 spec document
- Certification Request for jbatch v2.1.0-M2 + jakarta batch api v2.1.0 HOT 2
- Loading a batch artifact as a CDI Bean by bean name via @Producer in some other bean class HOT 1
- Finalize Jakarta Batch 2.1 Release HOT 1
- Batch 2.1.0 API JAR OSGi bundle headers are wrongly using 2.0 version values HOT 1
- Version 2.1.1 "specification" artifact released with "2.2" as the spec version in filename, spec header
- Use 'jakartaee' namespace prefix in job.xsd and batch.xsd (the convention used by other Jakarta specs). HOT 2
- Certification Request for JBeret 2.1.0.Final + jakarta batch api 2.1.0 HOT 1
- Consider a beforeSplitFlow/afterSplitFlow listener to give app control on the split-flow thread
- Move this repo to https://github.com/jakartaee HOT 5
- _ characters in some enum values in spec document HOT 1
- Jakarta Batch CDI integration language over-specifies behavior and wrongly describes implementation(Weld)-specific behavior HOT 1
- Question about the plan to support Jakarta EE Platform 11 HOT 2
- Can the `cdi-api` version be updated? HOT 5
- ClassifierCompositeItemWriter use contravariance for items classification, why? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from batch.