Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-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 68DD6104BB for ; Sat, 28 Sep 2013 15:28:20 +0000 (UTC) Received: (qmail 85152 invoked by uid 500); 28 Sep 2013 15:28:06 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 85018 invoked by uid 500); 28 Sep 2013 15:28:06 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 84869 invoked by uid 99); 28 Sep 2013 15:28:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Sep 2013 15:28:04 +0000 Date: Sat, 28 Sep 2013 15:28:04 +0000 (UTC) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (FELIX-4238) Unnecessary re-initialization of PersistenceManagers in configadmin 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/FELIX-4238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger closed FELIX-4238. ------------------------------------ Close after release > Unnecessary re-initialization of PersistenceManagers in configadmin > ------------------------------------------------------------------- > > Key: FELIX-4238 > URL: https://issues.apache.org/jira/browse/FELIX-4238 > Project: Felix > Issue Type: Bug > Components: Configuration Admin > Affects Versions: configadmin-1.6.0 > Environment: MacOSX 10.8.5, Java 1.6.0_51, org.eclipse.osgi 3.9.0 > Reporter: Matthias > Assignee: Felix Meschberger > Priority: Minor > Labels: patch > Fix For: configadmin-1.8.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > Brief description: If the PersistenceManager is replaced during runtime (e.g. after registering, unregistering and registering again), the ConfigurationManager always re-initializes its list of PersistenceManagers. Thus, no caching is possible and configurations are loaded unnecessarily. > Details: In the ConfigurationManager line 818 getTrackingCount() on the service tracker for PersistenceManagers is called. If the number returned is different to the number of currently known PersistenceManagers, then the list of PersistenceManagers is re-initialized. This works fine as long as the list of PersistenceManager increases. But if a PersistenceManager is unregistered, getTrackingCount() returns an increased number but the number of known PersistenceManagers is decreased. Thus, the if-condition in line 819 is always true, which causes a re-initialization of the list of known PersistenceManagers. -- 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