felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (FELIX-1239) AbstractComponentManager.getServiceReference need not be synchronized
Date Fri, 31 Jul 2009 15:08:15 GMT

     [ https://issues.apache.org/jira/browse/FELIX-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Felix Meschberger updated FELIX-1239:

    Fix Version/s:     (was: scr-1.0.10)

Retargeting fixes for SCR 1.2.0 release. There will be no 1.0.10 release.

> AbstractComponentManager.getServiceReference need not be synchronized
> ---------------------------------------------------------------------
>                 Key: FELIX-1239
>                 URL: https://issues.apache.org/jira/browse/FELIX-1239
>             Project: Felix
>          Issue Type: Improvement
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.0.10
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: scr-1.2.0
> With the changes to redo the event machinery in the component managers, the AbstractComponentManager.getServiceReference
method has been made synchronous. Since this method backs the ComponentContext.getServiceReference()
such calls may be blocked while the AbstractComponentManager is changing state.
> The getServiceReference method should therefore not be synchronized and need not be either:
We make the service reference field of the AbstractComponentManager volatile and before calling
the State.getServiceReference method we copy the current state to a local variable before
calling the getServiceReference method. In addition, we will have to cope for the situation
that the Service becomes unregistered while trying to get the ServiceReference, which may
cause an IllegalStateException to be thrown.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message