[jboss-cvs] JBossAS SVN: r79023 - in projects/aop/trunk: asintegration-core/src/main/org/jboss/aop/asintegration/core and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 2 08:00:28 EDT 2008
Author: kabir.khan at jboss.com
Date: 2008-10-02 08:00:28 -0400 (Thu, 02 Oct 2008)
New Revision: 79023
Modified:
projects/aop/trunk/aop/src/main/org/jboss/aop/advice/ClassifiedBindingAndPointcutCollection.java
projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java
Log:
[JBAOP-655] When a binding is added the pointcuts collection also needs to be maintained
Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/advice/ClassifiedBindingAndPointcutCollection.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/advice/ClassifiedBindingAndPointcutCollection.java 2008-10-02 11:58:37 UTC (rev 79022)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/advice/ClassifiedBindingAndPointcutCollection.java 2008-10-02 12:00:28 UTC (rev 79023)
@@ -485,6 +485,13 @@
bindings = new LinkedHashMap<String, AdviceBinding>();
}
bindings.put(binding.getName(), binding);
+
+ if (pointcuts == UnmodifiableEmptyCollections.EMPTY_LINKED_HASHMAP)
+ {
+ pointcuts = new LinkedHashMap<String, Pointcut>();
+ }
+ pointcuts.put(binding.getPointcut().getName(), binding.getPointcut());
+
// create the pointcutinfo outside of methods to avoid duplicate creation
// of pointcut infos
PointcutInfo pointcutInfo = new PointcutInfo(binding.getPointcut(), binding,
@@ -494,6 +501,7 @@
pointcutInfos = new LinkedHashMap<String, PointcutInfo>();
}
pointcutInfos.put(pointcutInfo.getPointcut().getName(), pointcutInfo);
+
addGet(binding, pointcutInfo);
addSet(binding, pointcutInfo);
addConstruction(binding, pointcutInfo);
Modified: projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java
===================================================================
--- projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java 2008-10-02 11:58:37 UTC (rev 79022)
+++ projects/aop/trunk/asintegration-core/src/main/org/jboss/aop/asintegration/core/AspectManagerServiceDelegate.java 2008-10-02 12:00:28 UTC (rev 79023)
@@ -298,7 +298,13 @@
if (base != null)
{
log.debug("Deploying base aspects " + base);
+
+//DELETE THIS
+System.out.println("=========> Deploying base aspects " + base);
+
AspectXmlLoader.deployXML(base);
+//DELETE THIS
+System.out.println("=========> pointcuts " + AspectManager.getTopLevelAspectManager().getPointcuts().values());
deployedBaseXml = true;
}
}
@@ -319,12 +325,16 @@
if (base != null)
{
log.debug("Undeploying base aspects " + base);
+ //DELETE THIS
+System.out.println("=========> UnDeploying base aspects " + base);
AspectXmlLoader.undeployXML(base);
+ //DELETE THIS
+System.out.println("=========> pointcuts " + AspectManager.getTopLevelAspectManager().getPointcuts().values());
}
}
catch (Exception e)
{
- log.warn("Error loading " + baseXml + " file" + e);
+ log.warn("Error undeploying " + baseXml + " file" + e);
}
deployedBaseXml = false;
}
More information about the jboss-cvs-commits
mailing list