Open follis opened 3 years ago
Guess it is more a matter of defining wat @BatchProperty types are supported? Currently spec is quite silent on that. Batchee and jberet support it AFAIK so can be worth just reusing @BatchProperty no?
I think this is part of the issue to support the injection of common data types, such as primitives and wrappers, collections, date, etc. JBeret already supports some of these:
For example, to inject a Map or Properties, in job.xml
In injecting class:
@Inject @BatchProperty(name = "map") Properties properties;
This approach can also be generalized to support arbitrary user data types, specifying the property name as a JSON format, and bind to the target type via JSONB or the like:
On Thu, Apr 1, 2021 at 9:27 AM Romain Manni-Bucau @.***> wrote:
Guess it is more a matter of defining wat @BatchProperty types are supported? Currently spec is quite silent on that. Batchee and jberet support it AFAIK so can be worth just reusing @BatchProperty no?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eclipse-ee4j/batch-api/issues/133#issuecomment-811907304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAP3UE3TEVUKJ3KAQPXMFS3TGRYE5ANCNFSM4QD3CNYA .
Hmm, yes, originally this was intended to just take the String BatchProperty values and inject them all at once, but good points from Romain, Cheng... that this needs to be considered in light of: https://github.com/eclipse-ee4j/batch-api/issues/43
Seems we're not going to get to this in 2.1.
All the entire set of properties to be injected at once into a single Properties object. Application can them get a list of properties from the Properties object rather than having to know and hard-code for them ahead of time.