[
https://issues.apache.org/jira/browse/MYFACES-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13792001#comment-13792001
]
Leonardo Uribe commented on MYFACES-3786:
-----------------------------------------
Precisely what I want to show here is the constraints we are bound, at least in
JSF 2.2.
I know that the best scenario is all JSF artifacts can be managed by CDI. If
all objects are managed by CDI, things are easier. Just use BeanManager API
from start and don't care about make CDI library optional and all reflection
code made to keep it in that way, and we will not have the problem to call
postConstruct or preDestroy, because if everything is managed by CDI, the scope
of the instance will take care of that, but unfortunately that is not the
current situation.
In this case we are forced to deprecate LifecycleProvider and introduce a new
spi interface for that. That's not something I would want to but its what it
takes to get the job done.
I agree the spec is highly ambiguous in this part. But we don't have much
choice in this part. It is clear CDI is an optional library for JSF 2.2. There
is a section in JSF 2.2 (Preface / Related Technologies ) and there is not any
mention to CDI at all. If you look in the spec pdf, the word CDI only appears
in section 5.4 and in relationship with CDI ViewScope.
> Web Container injection support should be provided for additional lifecycle
> artifacts (not just managed beans)
> --------------------------------------------------------------------------------------------------------------
>
> Key: MYFACES-3786
> URL: https://issues.apache.org/jira/browse/MYFACES-3786
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-344
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Attachments: cdiELresolverWeb.zip, cdiELResolver.zip,
> cdiPartialViewContext.war, cdiPartialViewContext.zip, cdi.patch,
> cdiphaselistener1.patch, cdiphaselistener2.patch, cdiValidatorSource.zip,
> cdiValidator.war
>
>
> This issue is all about how to inject beans into jsf artifacts.
> See JSF 2.2 section 5.4.1
> The problem here is in some point we need to give the control to the
> underlying environment to inject beans into the artifacts, but we don't know
> much about how to properly do it, so we need to try with examples.
--
This message was sent by Atlassian JIRA
(v6.1#6144)