Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDI details : Configuration #1195

Open
jansupol opened this issue Nov 21, 2023 · 6 comments
Open

CDI details : Configuration #1195

jansupol opened this issue Nov 21, 2023 · 6 comments

Comments

@jansupol
Copy link
Contributor

In the environment of shared CDI, if multiple Applications are started/deployed, what is the expected behavior? Do the applications share their configuration? Or do the implementations need to find a way to distinguish between the configuration, providers, and properties for each Application when injecting them? Or is the expectation to have just one microservice runtime for each application?

Was this already discussed and I missed the discussion?

@spericas
Copy link
Contributor

@jansupol Is this related to the proposal to evaluate multiple applications in 4.0? Is that what you mean by "shared CDI"?

@jansupol
Copy link
Contributor Author

jansupol commented Nov 27, 2023

@spericas No, my original concern was an application server such as Glassfish running a single CDI instance while deploying multiple applications/wars and registering the respective Configuration beans into this shared CDI BeanManager.
In the end, yes, it is the same as supporting multiple Applications at a time.

@spericas
Copy link
Contributor

@jansupol In an app server environment, shouldn't applications be completely isolated to each other? Isn't this typically accomplished using independent CLs? Maybe I'm just not understanding the "shared CDI" use case and you can elaborate it a bit more.

@jansupol
Copy link
Contributor Author

@spericas Is it isolated in the EAR, too? There are multiple WARs and multiple applications at the same war, too.

@jamezp
Copy link
Contributor

jamezp commented Jan 30, 2024

From what I understand, there was no decision made on whether more than one application could be defined per WAR, #1158. In the API section there seems to be an open question of:

Review support for Application subclasses: zero or more? zero or one?

The current spec itself doesn't indicate whether multiple applications are supported.

@arjantijms
Copy link
Contributor

Is it isolated in the EAR, too? There are multiple WARs and multiple applications at the same war, too.

Actually, CDI has never really worked well with an EAR. The specification just wasn't designed for it, even though it tries some things with hierarchical bean archives. EARs are more associated with EJB and JNDI, maybe just about SOAP, and many "reffing" (role-refs, datasource-refs, etc).

Modern REST / CDI applications don't seem to be used with EARs at all, at least that's my perception (and those specs somewhat back that up).

Some good resources on this:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants