Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 1145 invoked from network); 2 Jun 2009 21:01:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jun 2009 21:01:21 -0000 Received: (qmail 51170 invoked by uid 500); 2 Jun 2009 21:01:33 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 51111 invoked by uid 500); 2 Jun 2009 21:01:33 -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 51044 invoked by uid 99); 2 Jun 2009 21:01:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 21:01:33 +0000 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; Tue, 02 Jun 2009 21:01:30 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E76B3234C1ED for ; Tue, 2 Jun 2009 14:01:08 -0700 (PDT) Message-ID: <925871734.1243976468947.JavaMail.jira@brutus> Date: Tue, 2 Jun 2009 14:01:08 -0700 (PDT) From: "Agemo Cui (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-1185) If a static/mandatory reference to a service is unregistered, the component should be deactivated synchronously instead of asynchronously In-Reply-To: <306391124.1243487745543.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-1185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715683#action_12715683 ] Agemo Cui commented on FELIX-1185: ---------------------------------- Hi Felix, Could you be kind to review the method AbstractComponentManager.getStatisfiedState(also ServiceFactoryComponentManager.getService and ungetService)? Because my changes give them a different path from the original implementation. So I'm afraid that could be a problem. Need your help. Thanks, Agemo > If a static/mandatory reference to a service is unregistered, the component should be deactivated synchronously instead of asynchronously > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: FELIX-1185 > URL: https://issues.apache.org/jira/browse/FELIX-1185 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) > Affects Versions: scr-1.0.8 > Reporter: Agemo Cui > Assignee: Felix Meschberger > Fix For: scr-1.0.10 > > Attachments: AbstractComponentManager.java, AbstractComponentManager.java, ComponentFactoryImpl.java, scr-changes on revision 778604.zip > > > In the specification cmpn 112.3.3 Reference Policy, it says "Component configurations are deactivated before any bound service for a reference having a static policy becomes unavailable." > My understanding is the deactivate method of the component must be called before any unbind method for a static/mandatory reference is called. And it's reasonable for a static/mandatory reference to be still available in the deactivate method. > If the component is deactivated asynchronously when a static/mandatory reference to a service is unregistered, then it's possible that the unbind method is called before the deactivate method is called, which makes the service unavailable in the deactivate method. > This bug may relate to FELIX-1178. > The fix for this bug should also fix FELIX-1178. No need to add a new flag. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.