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 1DCBCF264 for ; Thu, 28 Mar 2013 15:10:42 +0000 (UTC) Received: (qmail 80526 invoked by uid 500); 28 Mar 2013 14:56:47 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 80262 invoked by uid 500); 28 Mar 2013 14:56:43 -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 79847 invoked by uid 99); 28 Mar 2013 14:56:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Mar 2013 14:56:33 +0000 Date: Thu, 28 Mar 2013 14:56:33 +0000 (UTC) From: "Tomas Brimor (JIRA)" To: dev@aries.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ARIES-1042) Blueprint XML with service element that uses auto-export and has nested registration-listener element will not have its listener registered 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-1042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tomas Brimor updated ARIES-1042: -------------------------------- Description: Changes to ServiceRecipe.java between org.apache.aries.blueprint.core-1.0.1 (Karaf 2.3.0) and org.apache.aries.blueprint.core-1.1.0 and (Karaf 2.3.1) breaks listener registration when the wrapping blueprint service element uses the auto-export attribute. The problem *seems* to be how the "registered-flag" is handled. In version 1.0.1 the flag would be set on entering register/unregister while in 1.1.0 it is set last in each method. This has the consequence that if the service tag uses the auto-export attribute the getClasses() --> internalCreateService() --> createService() method calls to create the service will check if the service is registered or not before registering listeners. As this was set on entering the register method earlier this would be true but in the new version it will not yet be set and therefore no listeners will be created. Version 1.0.1: {code} register() set registered = true getClasses() createService() if registered == true registerListeners() if registered != true unregisterListeners() {code} Version 1.1.0: {code} register() getClasses() createService() if registered == true registerListeners() if registered != true unregisterListeners() set registered = true {code} Blueprint XML: {code} {code} was: Changes to ServiceRecipe.java between org.apache.aries.blueprint.core-1.0.1 (Karaf 2.3.0) and org.apache.aries.blueprint.core-1.1.0 and (Karaf 2.3.1) breaks listener registration when the wrapping blueprint service element uses the auto-export attribute. The problem *seems* to be how the "registered-flag" is handled. In version 1.0.1 the flag would be set on entering register/unregister while in 1.1.0 it is set last in each method. This has the consequence that if the service tag uses the auto-export attribute the getClasses()->internalCreateService()->createService() method calls to create the service will check if the service is registered or not before registering listeners. As this was set on entering the register method earlier this would be true but in the new version it will not yet be set and therefore no listeners will be created. Version 1.0.1: {code} register() set registered = true getClasses() createService() if registered == true registerListeners() if registered != true unregisterListeners() {code} Version 1.1.0: {code} register() getClasses() createService() if registered == true registerListeners() if registered != true unregisterListeners() set registered = true {code} Blueprint XML: {code} {code} > Blueprint XML with service element that uses auto-export and has nested registration-listener element will not have its listener registered > ------------------------------------------------------------------------------------------------------------------------------------------- > > Key: ARIES-1042 > URL: https://issues.apache.org/jira/browse/ARIES-1042 > Project: Aries > Issue Type: Bug > Components: Blueprint > Affects Versions: blueprint-core-1.1.0 > Reporter: Tomas Brimor > > Changes to ServiceRecipe.java between org.apache.aries.blueprint.core-1.0.1 (Karaf 2.3.0) and org.apache.aries.blueprint.core-1.1.0 and (Karaf 2.3.1) breaks listener registration when the wrapping blueprint service element uses the auto-export attribute. > The problem *seems* to be how the "registered-flag" is handled. In version 1.0.1 the flag would be set on entering register/unregister while in 1.1.0 it is set last in each method. > This has the consequence that if the service tag uses the auto-export attribute the getClasses() --> internalCreateService() --> createService() method calls to create the service will check if the service is registered or not before registering listeners. As this was set on entering the register method earlier this would be true but in the new version it will not yet be set and therefore no listeners will be created. > Version 1.0.1: > {code} > register() > set registered = true > getClasses() > createService() > if registered == true > registerListeners() > if registered != true > unregisterListeners() > {code} > Version 1.1.0: > {code} > register() > getClasses() > createService() > if registered == true > registerListeners() > if registered != true > unregisterListeners() > set registered = true > {code} > Blueprint XML: > {code} > > > > > > > > {code} -- 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