1. Enable use of the pluggable-instrumentor.jar in your run.conf like this :
JAVA_OPTS=$JAVA_OPTS -javaagent:deployers/jboss-aop-jboss5.deployer/pluggable-instrumentor.jar


2. Enable load time weaving in your aop.xml(conf/bootstrap/aop.xml)
<property name="enableLoadtimeWeaving">true</property>
<property name="include"> <!-- Add your package prefixes here --> </property>


3. Optional : if you want to apply own aop configuration, add runtime property your run shell.
-Djboss.aop.path=<path to jboss-aop.xml>


Do you have standalone aop application? Try this :
$ java -cp=<classpath as described above> -Djboss.aop.path=<path to jboss-aop.xml> \
         -Djboss.aop.class.path=aspects.jar
         com.blah.MyMainClass




크리에이티브 커먼즈 라이센스
Creative Commons License
2009/04/03 13:07 2009/04/03 13:07
http://www.javapattern.info/trackback/240