Code Monkey home page Code Monkey logo

Comments (4)

rmannibucau avatar rmannibucau commented on September 23, 2024

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.

radcortez avatar radcortez commented on September 23, 2024

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.

rmannibucau avatar rmannibucau commented on September 23, 2024

(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

  1. if explicit in parameters use it
  2. check a spec system property
  3. (optional) check a lib/<file>.properties
  4. use service discovery (loader these days)

from batch.

scottkurz avatar scottkurz commented on September 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.