[ 
https://issues.apache.org/jira/browse/FELIX-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669133#action_12669133
 ] 

Don Brown commented on FELIX-908:
---------------------------------

The cause is how our plugin system interacts with OSGi, not so much as a 
technical requirement but legacy design decision.  There are a number of 
situations where the plugin system will iterate through every plugin (which may 
or may not be an OSGi bundle) looking for something, with the first call going 
to isEnabled(), where the bundle state check happens for OSGi plugins.

> Unsynchronize access to bundle state inside BundleInfo by making the variable 
> volatile
> --------------------------------------------------------------------------------------
>
>                 Key: FELIX-908
>                 URL: https://issues.apache.org/jira/browse/FELIX-908
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: felix-1.2.1

>            Reporter: Anatoli Kazatchkov
>            Priority: Minor
>         Attachments: bundle_info.patch
>
>
> Synchronized access to bundle state inside {{BundleInfo}} class creates an 
> unnecessary contention point in environments where {{bundle.getState()}} is 
> called a lot.
> Declaring {{m_state}} variable volatile and removing synchronization from 
> {{setState()}} and {{getState()}} will do the trick.I will attach the patch.

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

Reply via email to