You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2017/05/08 13:57:04 UTC

[jira] [Commented] (DELTASPIKE-1198) BeanManagerProvider.isActive() returns true after container shutdown

    [ https://issues.apache.org/jira/browse/DELTASPIKE-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000761#comment-16000761 ] 

Mark Struberg commented on DELTASPIKE-1198:
-------------------------------------------

I've reviewed this and I interpret BeanManagerProvider#isActive() a bit different.
It returns true if the BMP got initialised. But having the BeanManagers itself is something different.
We might probably not unload the BeanManagers properly, which would be a problem. Investigating.

> BeanManagerProvider.isActive() returns true after container shutdown
> --------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1198
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1198
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.7.0, 1.7.2
>            Reporter: Sean Flanigan
>            Assignee: Mark Struberg
>
> While trying to implement DELTASPIKE-1197 I found that {{BeanManagerProvider.isActive()}} returns true after container shutdown.
> The javadocs for {{isActive()}} say "@return true if the BeanManagerProvider is ready to be used", but when it is in this state, the BeanManagerProvider can't actually be used because the CDI container is not active. 
> In the case of Weld, when {{BeanProvider.getContextualReference()}} was called I got errors like "java.lang.IllegalStateException: Singleton not set for STATIC_INSTANCE => []". There was no stack trace, but that message comes from Weld's RegistrySingletonProvider.java.
> It would seem reasonable to reset bmpSingleton to null during cleanupStoredBeanManagerOnShutdown, but for some reason this breaks a lot of tests.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)