Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7EBD103FE for ; Mon, 14 Oct 2013 16:48:48 +0000 (UTC) Received: (qmail 86403 invoked by uid 500); 14 Oct 2013 16:48:47 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 86134 invoked by uid 500); 14 Oct 2013 16:48:44 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 86061 invoked by uid 99); 14 Oct 2013 16:48:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Oct 2013 16:48:43 +0000 Date: Mon, 14 Oct 2013 16:48:43 +0000 (UTC) From: "Leonardo Uribe (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MYFACES-3786) Web Container injection support should be provided for additional lifecycle artifacts (not just managed beans) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MYFACES-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13794263#comment-13794263 ] Leonardo Uribe commented on MYFACES-3786: ----------------------------------------- I would prefer only one abstract method. abstract void inject(Object instance, String scope) and this one void inject(Object instance) with a default implementation that call inject(instance,null). But I like keep things simple and avoid multiple methods in that part to override, so better one abstract method, because after all, this method will be called only by JSF internals. Anyway is the same. Who defines the scope of the injected object in this case? JSF. So as long as the bean container provides the scope we need, everything will work well. Any disadvantage? I don't see anything from JSF perspective. We are providing the necessary information to deal with the injection to the bean container, that's it. It is up to the bean container how to deal with that. Theorically there should be some structure that holds the injected reference to call preDestroy in the right time. But in that sense, it is resposibility of JSF to deal with that logic. If the instance is a Factory, FactoryFinder holds the instances. If is an application scope artifact, the same and so on. There is no need to hold both the creationalContext and the instance on the same place, more if we consider that creationalContext is a implementation detail of CDI. > 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 > Fix For: 2.2.0 > > Attachments: cdiELresolverWeb.zip, cdiELResolver.zip, cdiPartialViewContext.war, cdiPartialViewContext.zip, cdi.patch, cdiphaselistener1.patch, cdiphaselistener2.patch, cdirevised.patch, cdiValidatorSource.zip, cdiValidator.war, MYFACES-3786-1.patch, MYFACES-3786-2.patch > > > 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)