Hi,
i'm in trouble with managing unknow aspects at runtime and i want to know if this kind of feature is supported by jboss-aop. I'll try to explain my problem with an example:
I have two classes, Service and ServiceManager.
Both are tagged with @Prepare ("all(this)").
ServiceManager listens to aspect class (tagged with @Aspect e defining some bindings). When an aspect arrives, ServiceManager load the class using the following code:
AspectManager manager = AspectManager.instance(ucl);
AspectAnnotationLoader loader = new AspectAnnotationLoader(manager);
loader.setClassLoader(ucl);
InputStream in = new DataInputStream(ObjectFromNetwork));
List list = new ArrayList();
list.add(in);
Iterator iterator = list.iterator();
loader.deployInputStreamIterator(iterator);
So far the only results I obtained are that the deploy seems to end successfully but the advice is not thrown or the following exception:
java.lang.NullPointerException
at org.jboss.aop.pointcut.MethodMatcher.(MethodMatcher.java:72)
at org.jboss.aop.pointcut.ExecutionMethodMatcher.(ExecutionMethodMatcher.java:53)
at org.jboss.aop.pointcut.PointcutExpression.matchesExecution(PointcutExpression.java:118)
at org.jboss.aop.Advisor.resolveMethodPointcut(Advisor.java:1333)
There is a way to resolve this problem using jboss-aop?
In the documentation I found something similar using the JBoss AS where, an aspect inserted in a pre-defined directory, is automatically deployed.
How does this feature really work?
Thanks
Emanuele
hi, this is the design forum. you'll have better luck trying in the aop user forum here: http://www.jboss.com/index.html?module=bb&op=viewforum&f=236