From dev-return-17452-apmail-aries-dev-archive=aries.apache.org@aries.apache.org Mon Jun 27 09:27:53 2016 Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-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 51F4019EC1 for ; Mon, 27 Jun 2016 09:27:53 +0000 (UTC) Received: (qmail 7930 invoked by uid 500); 27 Jun 2016 09:27:53 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 7418 invoked by uid 500); 27 Jun 2016 09:27:52 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 7316 invoked by uid 99); 27 Jun 2016 09:27:52 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jun 2016 09:27:52 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1D59E2C1F6B for ; Mon, 27 Jun 2016 09:27:52 +0000 (UTC) Date: Mon, 27 Jun 2016 09:27:52 +0000 (UTC) From: "Grzegorz Grzybek (JIRA)" To: dev@aries.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (ARIES-1578) blueprint-cm doesn't support org.osgi.service.cm.ConfigurationPlugin 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/ARIES-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grzegorz Grzybek reassigned ARIES-1578: --------------------------------------- Assignee: Grzegorz Grzybek > blueprint-cm doesn't support org.osgi.service.cm.ConfigurationPlugin > -------------------------------------------------------------------- > > Key: ARIES-1578 > URL: https://issues.apache.org/jira/browse/ARIES-1578 > Project: Aries > Issue Type: Bug > Components: Blueprint > Reporter: Paolo Antinori > Assignee: Grzegorz Grzybek > > I have found an issue with the {{blueprint-cm}} module: > it doesn't integrate with possible implementation of {{org.osgi.service.cm.ConfigurationPlugin}} registered in the OSGi framework. > That interface allows to intercept {{ConfigAdmin}} properties updates, allowing to manipulate their content without persisting them anywhere. > A sample usacase can be a decrypt component that decrypts values on the fly. > The issue on {{blueprint-cm}} is with the current implementation of {{CmPropertyPlaceholder}}: > https://github.com/apache/aries/blob/trunk/blueprint/blueprint-cm/src/main/java/org/apache/aries/blueprint/compendium/cm/CmPropertyPlaceholder.java#L130-L140 > {code:java} > public void updated(Dictionary props) { > if ("reload".equalsIgnoreCase(updateStrategy) && !equals(properties, props)) { > LOGGER.debug("Configuration updated for pid={}", persistentId); > // Run in a separate thread to avoid re-entrance > new Thread() { > public void run() { > blueprintContainer.reload(); > } > }.start(); > } > {code} > {{updated()}} is correctly forwarded the {{props}} param, containing eventual manipulation of registered {{ConfigurationPlugin}} instances, but that content is discarded. The event will trigger a reload of the whole blueprint context, that will fetch the configuration from {{ConfigAdmin}} directly, thus bypassing the plugin behavior. -- This message was sent by Atlassian JIRA (v6.3.4#6332)