|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
_______________________________________________ weld-issues mailing list [email protected] https://lists.jboss.org/mailman/listinfo/weld-issues

I traced the example PhaseListener (and MyFaces ExtVal startup) thru a debugger and found whats going on.
Weld has an ELCreationalContext which works with a stack, ValueExpressions always push/pop the stack, whereas ELResolver expects the stack to have already been pushed in the case of Dependent scoped objects.
Excerpts from org.jboss.weld.el.AbstractWeldELResolver:
private ELCreationalContext<?> getELCreationalContext(ELContext context) { ELCreationalContextStack stack = ELCreationalContextStack.getCreationalContextStore(context); if (!stack.isEmpty()) { return stack.peek().get(); } else { throw new IllegalStateException("No CreationalContext registered for EL evaluation, it is likely that the the _expression_ factory has not been wrapped by the CDI BeanManager, which must be done to use the ELResolver from CDI"); } }Excerpts from org.jboss.weld.el.WeldValueExpression:
@Override public Object getValue(final ELContext context) { ELCreationalContextStack store = getCreationalContextStore(context); try { store.push(new CreationalContextCallable()); return delegate().getValue(context); } finally { CreationalContextCallable callable = store.pop(); if (callable.exists()) { callable.get().release(); } } }