axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Illsley" <davidills...@gmail.com>
Subject Re: [jira] Created: (AXIS2-3344) Performance: Synchronization of AbstractContext.addPropertyDifference degrades performance
Date Thu, 15 Nov 2007 13:05:11 GMT
Rich,
If ConcurrentHashMap is a better solution, you can use the backport
version which works on Java 1.4 and Java5. See
org.apache.axis2.util.CallbackReceiver for an example.
Cheers,
David

On 15/11/2007, Rich Scheuerle (JIRA) <jira@apache.org> wrote:
> 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: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message