JBoss Community

Re: Cannot intercept a method

created by bbarin in JBoss AOP - View the full discussion

Hi,

 

After some digging around the information spread over the web, I have found the solution:

 

  • Enable load time weaving in the file JBOSS_HOME\server\production\deploy\jboss-aop-jdk50.deployer\META-INF\jboss-service.xml
  • Copy JBOSS_HOME\server\production\deploy\jboss-aop-jdk50.deployer\pluggable-instrumentor.jar to JBOSS_HOME\lib\endorsed folder
  • Enable the agent in run.bat adding the following line:

               set JAVA_OPTS=%JAVA_OPTS% -javaagent:%JBOSS_ENDORSED_DIRS%\pluggable-instrumentor.jar

 

 

Be sure you have:

- Your aspects deployed in the "deploy" folder either a .jar or .aop file

- In case of .jar: You must have a <filename>-aop.xml in the "deploy" folder (preferred, more flexible)

- In case of .aop: Only be sure there is META-INF/jboss-aop.xml containing the aspect definition in your package

 

Cheers,

 

Bruno

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community