Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jakartaee-platform-dev] Batch+CDI integration: proposal to continue NOT injecting CDI beans into non-bean Batch artifacts

Hi,

I wanted to get some Platform-level input for the discussion we're having in Jakarta Batch re: CDI integration.

The key question is whether it's OK to continue only doing CDI bean injection into Batch artifacts that are themselves beans (via the CDI-defined standard mechanims:  BDA, etc.) , rather than injecting into any Batch artifact (as the Platform requires for other specs like Servlet, etc.).

An easy starting point to read the argument laid out is the last message:
https://www.eclipse.org/lists/jakartabatch-dev/msg00226.html
plus the two previous embedded in this reply (from me and from Reza), but you maybe don't have to read the whole thread.

So we're proposing formalizing the current behavior (which in EE 7 in Batch 1.0 had been maybe sort of implied but not mandated as Batch was CDI-aware but tried to be DI-neutral for Spring Batch, etc.).

I do think there's a counter-argument that says the way integration is done in the Jakarta platform is to support CDI injection into "special" artifact instances defined by the component specs, as described in this table:
https://github.com/eclipse-ee4j/jakartaee-platform/blob/master/specification/src/main/asciidoc/platform/ResourcesNamingInjection.adoc#a651  
and thus Batch should follow this pattern.

In the thread you'll see more pros and cons (I won't rewrite them here for now).  

But it does seem to me like the Platform should have a common approach or at least some "institutional knowledge" to guide each spec as it integrates with CDI.

Thank you,
------------------------------------------------------
Scott Kurz
WebSphere / Open Liberty Batch and Developer Experience
skurz@xxxxxxxxxx
--------------------------------------------------------



Back to the top