[jboss-user] [JBoss AOP] - Dynamic AOP

mane81 do-not-reply at jboss.com
Thu Oct 23 16:19:32 EDT 2008

I have some questions:
1) if I want to prepare some classes for dynamic aop I have to put the @prepare ("all(this)") annotation in all classes or putting it in the main class is enough?

2) I need a facility like the hot deployment of JBoss  where if an aspect is inserted in a specified directory it is deployed at runtime;
I have a thread that listens for file insertion/removal in the directory;
I want to use only annotated aspects.
Is the following code correct to deploy a new unknown (not in the classpath) aspect?

URLClassLoader ucl = new URLClassLoader(new URL[] {new File("RunTimeDeploy/").toURI().toURL()});
AspectManager manager = AspectManager.instance(ucl);
AspectAnnotationLoader loader = new AspectAnnotationLoader(manager);
InputStream = new DataInputStream(new FileInputStream("RunTimeDeploy/newAspect.class"));
List list = new ArrayList();
Iterator iterator = list.iterator();

3) Can the pointcuts defined in the annotated aspect refer to classes different from the one where the deploy occurred?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184299#4184299

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4184299

More information about the jboss-user mailing list