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] Closed: (FELIX-1239) AbstractComponentManager.getServiceReference need not be synchronized
Date Mon, 15 Jun 2009 10:53:07 GMT

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

Felix Meschberger closed FELIX-1239.
------------------------------------

    Resolution: Fixed

Implemented this change as described in Rev. 784722

> 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.0.10
>
>
> 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.


Mime
View raw message