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

Rich Scheuerle resolved AXIS2-3344.
-----------------------------------

    Resolution: Fixed

Committed Revision 595293

> Performance: Synchronization of AbstractContext.addPropertyDifference 
> degrades performance
> ------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3344
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3344
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Rich Scheuerle
>            Assignee: Rich Scheuerle
>
> Problem:
> David Strite, a member of the IBM performance analysis team, discovered that 
> the synchronization of AbstractContext.addPropertDifference has a performance 
> impact due to the high volume of callers of AbstractContext.getProperty and 
> AbstractContext.setProperty.
> Solution:
> The synchronization is changed so that it is limited to the case where a 
> ClusterManager is available.
> private void addPropertyDifference(String key) {
>         ConfigurationContext cc = getRootContext();
>         if (cc == null) {
>             return;
>         }
>         // Add the property differences only if Context replication is 
> enabled,
>         // and there are members in the cluster
>         ClusterManager clusterManager = 
> cc.getAxisConfiguration().getClusterManager();
>         if (clusterManager == null ||
>             clusterManager.getContextManager() == null) {
>             return;
>         }
>         // Narrowed the synchronization so that we only wait
>         // if a property difference is added.
>         synchronized(this) {
>             propertyDifferences.put(key, new PropertyDifference(key, false));
>         }
>     }
> Long Term Solution:
> We might want to consider using a ConcurrentHashMap (only available in JDK 
> 5+) or narrow the synchronization for the other methods.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to