1 Reply Latest reply on Oct 24, 2008 3:25 AM by stalep

    Dynamic Aspect: managing unknow aspect


      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);
      InputStream in = new DataInputStream(ObjectFromNetwork));
      List list = new ArrayList();
      Iterator iterator = list.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:
      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?