If a particular joinpoint is "prepared" you do not have to recompile or even shutdown 
the JVM to add or remove an advice from a particular joinpoint.  You can also 
add/remove interceptors on a per instance basis at runtime with a prepared joinpoint.

How to prepare?



This will instrument the class.

Also, any other pointcut def will cause the class to be instrumented.  Instrumented 
classes without advices have VERY low overhead.  It is one extra method call and a 
boolean check.  You won't even notice it.


With JDK 5.0 you do not need a custom classloader.  I've written an agent to work with 
the java.lang.instrument package and it works pretty well.  I haven't integrated it 
with JBoss yet though as I have to change the run script and write some tests.

Kevin Conner also wrote something for JDK 1.4 that modifies java.lang.Class to insert 
the necessary hooks for JBoss AOP.



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

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


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to