[jboss-cvs] JBossAS SVN: r70512 - projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 6 15:29:28 EST 2008
Author: flavia.rainone at jboss.com
Date: 2008-03-06 15:29:28 -0500 (Thu, 06 Mar 2008)
New Revision: 70512
Modified:
projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/AspectManager.java
Log:
[JBAOP-501] Bug solved.
Modified: projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/AspectManager.java
===================================================================
--- projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/AspectManager.java 2008-03-06 20:08:48 UTC (rev 70511)
+++ projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/AspectManager.java 2008-03-06 20:29:28 UTC (rev 70512)
@@ -1322,7 +1322,7 @@
/**
* Remove an interceptor pointcut with a given name
*/
- public synchronized void removeBinding(String name)
+ public void removeBinding(String name)
{
AdviceBinding binding = internalRemoveBinding(name);
if (binding != null)
@@ -1390,10 +1390,16 @@
/**
* Add an interceptor pointcut with a given name
*/
- public synchronized void addBinding(AdviceBinding binding)
+ public void addBinding(AdviceBinding binding)
{
- AdviceBinding removedBinding = internalRemoveBinding(binding.getName());
- Set affectedAdvisors = removedBinding == null? new HashSet(): new HashSet(removedBinding.getAdvisors());
+ Set affectedAdvisors = null;
+ AdviceBinding removedBinding = null;
+ synchronized(this)
+ {
+
+
+ removedBinding = internalRemoveBinding(binding.getName());
+ affectedAdvisors = removedBinding == null? new HashSet(): new HashSet(removedBinding.getAdvisors());
initBindingsMap();
synchronized (bindings)
{
@@ -1409,7 +1415,7 @@
pointcutInfos.put(pointcut.getName(), new PointcutInfo(pointcut, binding, this.transformationStarted));
updatePointcutStats(pointcut);
}
-
+ }
synchronized (advisors)
{
updateAdvisorsForAddedBinding(binding);
@@ -2013,7 +2019,7 @@
* Removes an AdviceBinding without notifying dynamic aop strategy.
* @param name the binding to be removed.
*/
- private AdviceBinding internalRemoveBinding(String name)
+ private synchronized AdviceBinding internalRemoveBinding(String name)
{
synchronized (bindings)
{
More information about the jboss-cvs-commits
mailing list