[
https://issues.apache.org/jira/browse/FELIX-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633733#action_12633733
]
Clement Escoffier commented on FELIX-732:
-----------------------------------------
I agree, the synchronization protocol is wrong. It does not prevent of double
object creation. It needs a more sophisticated protocol stopping threads during
the creation of an instance.
> Duplicate instance created of a managed service
> -----------------------------------------------
>
> Key: FELIX-732
> URL: https://issues.apache.org/jira/browse/FELIX-732
> Project: Felix
> Issue Type: Bug
> Components: iPOJO
> Affects Versions: iPOJO-0.8.0
> Reporter: Joao Assuncao
> Assignee: Clement Escoffier
>
> I noticed that when I start felix, sometimes are created two instances of a
> iPOJO managed service. This only happens when there is a configuration in
> ConfigurationAdmin.
> The culprit seems to be InstanceManager.getPojoObject(). The synchronization
> block does not prevent duplicate calls of createPojoObject() when there are
> two threads requesting a pojo instance that wasn't created.
> One of the threads seems to be the one parsing the metadata descriptor and
> the other is the configuration updater thread from Configuration Admin.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.