Coder Social home page Coder Social logo

According JBeret specification JBeret should be able to @Inject @BatchProperty File file, but it works only in special curcumstance. about jsr352 HOT 2 CLOSED

jberet avatar jberet commented on August 16, 2024
According JBeret specification JBeret should be able to @Inject @BatchProperty File file, but it works only in special curcumstance.

from jsr352.

Comments (2)

chengfang avatar chengfang commented on August 16, 2024

Batch jobs are defined in xml format and thus all batch job configurations are expressed in string-based values. I think this is a pretty fundamental part of the batch spec (JSR 352), though I have to admit this does impose some restrictions on batch applications, for instance, there is no typed non-string objects for configuration.

From a technical point of view, java.util.Properties are used in various parts of the spec to hold job parameters, partition properties, etc. This also implies string-based keys and values are expected. Since java.util.Properties is a subclass of java.util.Hashtable, so you can still call its put method to add non-string values, but this value may very likely be ignored.

from jsr352.

chengfang avatar chengfang commented on August 16, 2024

To inject object types into batch artifacts with more flexibility, you may want to consider using CDI. WE use CDI injections in some of the batch artifacts in jberet-support modules, for instance,

https://github.com/jberet/jberet-support/blob/master/src/main/java/org/jberet/support/io/JmsItemReaderWriterBase.java#L41

from jsr352.

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.