[JBoss JIRA] (CDI-626) How should CDI.current() and CDI.getBeanManager() behave for non-CDI apps?
by Romain Manni-Bucau (JIRA)
[ https://issues.jboss.org/browse/CDI-626?page=com.atlassian.jira.plugin.sy... ]
Romain Manni-Bucau edited comment on CDI-626 at 8/24/16 8:39 AM:
-----------------------------------------------------------------
Ok so rephrased it means: when should the resolution of the CDI context occurs: in the provider or in the CDI instance. For me the provider is a hook to let the impl be plugged so I'm tempted to say we can let getCdi() be passthrough and fail on getBeanManager() only. What you called "uninitialized" could actually be "initialized" as JNDI context is active but a resource can not be bound behind a name.
was (Author: rmannibucau):
Ok so rephrased it means: when should the resolution of the CDI context occurs: in the provider or in the CDI instance. For me the provider is a hook to let the impl be plugged so I'm tempted to say we can let getCdi() be passthrough and fail on getBeanManager() only. What you can "uninitialized" could actually be "initialized" as JNDI context is active but a resource can not be bound behind a name.
> How should CDI.current() and CDI.getBeanManager() behave for non-CDI apps?
> --------------------------------------------------------------------------
>
> Key: CDI-626
> URL: https://issues.jboss.org/browse/CDI-626
> Project: CDI Specification Issues
> Issue Type: Clarification
> Reporter: Mark Struberg
>
> We did hit the following situation:
> A user installs a Spring application WAR file in TomEE. In that case we don't boot the CDI container. But the JSF Container calls CDI.current().
> How should CDI.current() behave in that case? Throwing an IllegalStateException, returning null or return a non-functional BeanManager?
> We should also define the behaviour of CDI.getBeanManager while we are at it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)