From dev-return-69693-archive-asf-public=cust-asf.ponee.io@myfaces.apache.org Mon Jun 4 23:00:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B9326180674 for ; Mon, 4 Jun 2018 23:00:04 +0200 (CEST) Received: (qmail 62915 invoked by uid 500); 4 Jun 2018 21:00:03 -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 62689 invoked by uid 99); 4 Jun 2018 21:00:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2018 21:00:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9B3691A03EE for ; Mon, 4 Jun 2018 21:00:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.581 X-Spam-Level: X-Spam-Status: No, score=-0.581 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UgZo9hpro9hI for ; Mon, 4 Jun 2018 21:00:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 7CF045F39F for ; Mon, 4 Jun 2018 21:00:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C9014E0BF5 for ; Mon, 4 Jun 2018 21:00:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4C09021094 for ; Mon, 4 Jun 2018 21:00:00 +0000 (UTC) Date: Mon, 4 Jun 2018 21:00:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MYFACES-4235) PERF: DataModelBuilderProxy uses CDI.current().getBeanManager() rather than cached BeanManager in application map 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-4235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500843#comment-16500843 ] ASF GitHub Bot commented on MYFACES-4235: ----------------------------------------- pnicolucci closed pull request #4: MYFACES-4235: Use cached BeanManager URL: https://github.com/apache/myfaces/pull/4 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java b/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java index c1a21e8a7..45f2c7422 100644 --- a/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java +++ b/impl/src/main/java/org/apache/myfaces/cdi/model/DataModelBuilderProxy.java @@ -20,7 +20,6 @@ package org.apache.myfaces.cdi.model; import javax.enterprise.inject.spi.BeanManager; -import javax.enterprise.inject.spi.CDI; import javax.faces.context.FacesContext; import javax.faces.model.DataModel; import org.apache.myfaces.cdi.util.CDIUtils; @@ -34,7 +33,7 @@ @Override public DataModel createDataModel(FacesContext facesContext, Class forClass, Object value) { - BeanManager beanManager = CDI.current().getBeanManager(); + BeanManager beanManager = CDIUtils.getBeanManager(facesContext.getExternalContext()); FacesDataModelClassBeanHolder holder = CDIUtils.lookup(beanManager, FacesDataModelClassBeanHolder.class); return holder.createDataModel(facesContext, forClass, value); } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > PERF: DataModelBuilderProxy uses CDI.current().getBeanManager() rather than cached BeanManager in application map > ----------------------------------------------------------------------------------------------------------------- > > Key: MYFACES-4235 > URL: https://issues.apache.org/jira/browse/MYFACES-4235 > Project: MyFaces Core > Issue Type: Improvement > Components: JSR-372 > Affects Versions: 2.3.1 > Reporter: Paul Nicolucci > Assignee: Paul Nicolucci > Priority: Minor > Fix For: 2.3.2 > > > Using the cached BeanManager is a performance improvement. -- This message was sent by Atlassian JIRA (v7.6.3#76005)