Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 44248 invoked from network); 18 Jun 2008 13:01:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 13:01:36 -0000 Received: (qmail 13975 invoked by uid 500); 18 Jun 2008 13:01:38 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 13695 invoked by uid 500); 18 Jun 2008 13:01:38 -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 13684 invoked by uid 99); 18 Jun 2008 13:01:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 06:01:38 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 13:00:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1D62A234C138 for ; Wed, 18 Jun 2008 06:00:45 -0700 (PDT) Message-ID: <1329919409.1213794045114.JavaMail.jira@brutus> Date: Wed, 18 Jun 2008 06:00:45 -0700 (PDT) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Subject: [jira] Created: (FELIX-612) ConfigurationAdmin.createFactoryConfiguration should not persist Configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org ConfigurationAdmin.createFactoryConfiguration should not persist Configuration ------------------------------------------------------------------------------ Key: FELIX-612 URL: https://issues.apache.org/jira/browse/FELIX-612 Project: Felix Issue Type: Bug Components: Configuration Admin Affects Versions: configadmin-1.0.1, configadmin-1.0.0 Reporter: Felix Meschberger Assignee: Felix Meschberger Fix For: configadmin-1.0.2 Currently the ConfigurationAdmin.createFactoryConfiguration methods immediately persist factory configurations upon creating them. This is not really incorrect as per the spec. The problem comes with this opening the gate for potential garbage configuration to remain. Consider this sample method: public void createGarbage( String factoryPid ) { getConfigurationAdmin().createFactoryConfiguration( factoryPid ); } This method creates a new factory configuration object on each call and immediately drops any reference to it. Because the configuration PID of the configurations returned is created randomly, there is no way to ever retrieve this configuration again. Why ? getConfiguration cannot be used because the PID is unkown and listConfigurations will not return it because the configuration has no properties yet. So in the interest of not potentially producing garbage, the createFactoryConfiguration method should not immediately persist the configuration object. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.