[weld-issues] [JBoss JIRA] (WELD-2602) Report error if undeployed BeanManager used.
Title: Message Title Darran Lofthouse assigned an issue to Unassigned Weld / WELD-2602 Report error if undeployed BeanManager used. Change By: Darran Lofthouse Assignee: Darran Lofthouse Add Comment This message was sent by Atlassian Jira (v7.13.8#713008-sha1:1606a5c) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2602) Report error if undeployed BeanManager used.
Title: Message Title Darran Lofthouse commented on WELD-2602 Re: Report error if undeployed BeanManager used. Thanks Matěj Novotný in general yes the class loaders of the deployment are discarded on redeploy so any static references would also be discarded at the same time, however there is a recent trend for more spec defined implementations to be created as CDI implementations, within the application server (WildFly) that means we install them as shared modules so each app doesn't need to bring them all in manually but that is where if one of them contains static references they will live on longer than they should. Overall IMO the real bug is within the framework as mixing CDI and statics seems high risk - especially where those statics contain references to beans so I will be looking to contribute a fix there. But if I can find a way to adapt the error message in the BeanManager it may be quicker to track that is it a stale reference still held if we were to encounter a similar issue in the future. Add Comment This message was sent by Atlassian Jira (v7.13.8#713008-sha1:1606a5c) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2602) Report error if undeployed BeanManager used.
Title: Message Title Darran Lofthouse created an issue Weld / WELD-2602 Report error if undeployed BeanManager used. Issue Type: Enhancement Affects Versions: 3.1.2.Final Assignee: Unassigned Components: WildFly integration Created: 12/Nov/19 11:12 AM Priority: Major Reporter: Darran Lofthouse Debugging an issue recently I was receiving the following error: - Caused by: org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89) at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123) at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87) at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131) The actual cause of this was an Object was cached to a static in an application server module and re-used by a later deployment. The BeanManager associated via the proxy actually had 0 beans registered as the prior deployment had been undeployed. Raising this issue to consider if the fact that undeployment has happened can be tracked for a single
[weld-issues] [JBoss JIRA] (WELD-2602) Report error if undeployed BeanManager used.
Title: Message Title Darran Lofthouse commented on WELD-2602 Re: Report error if undeployed BeanManager used. I would assign to myself to take a closer look but don't seem to have that option within this Jira project. Add Comment This message was sent by Atlassian Jira (v7.13.8#713008-sha1:1606a5c) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues