Here is the content of the "jboss-aop.xml" file:
<?xml version="1.0" encoding="UTF-8"?>
| <aop>
| <prepare expr="execution(public * POJO->someMethod(..))"/>
| </aop>
In "execute" method I have deleted Per instance interception
| Advised advised = (Advised)pojo;
| advised._getInstanceAdvisor().insertInterceptor(new
InstanceInterceptor());
| System.out.println("--- pojo.counter++; ---");
| pojo.counter++;
|
I created META-INF directory and moved "jboss-aop.xml" in it. I also modified
the "-Djboss.aop.path" to point to the new location of "jboss-aop.xml". But it
doesn't work.
So I tried the verbose mode, Here is the new configuration of "VM aguments":
anonymous wrote : -Djboss.aop.verbose=true
-Djboss.aop.path=C:/Driverexemple/DynamicAOP/META-INF/jboss-aop.xml
-javaagent:C:/aop/jboss-aop_1.5.6.GA/lib-50/jboss-aop-jdk50.jar=-hotSwap
I run the application and before the end of the "for" loop I modified
"SimpleInterceptor" by "InstanceInterceptor".
The verbose mode display after 10000 without interception:
| --------------
| --- new POJO(); ---
| in empty constructor
| --- adding instance interceptors ---
| --- pojo.someMethod(); ---
| in someMethod
| --------------
| [trying to transform] SimpleInterceptor
| [debug] There are no caller pointcuts!
| [debug] was SimpleInterceptor converted: false
| [trying to transform] SimpleInterceptor
| [debug] There are no caller pointcuts!
| [debug] was SimpleInterceptor converted: false
| [debug] softmatch succeeded for : POJO [EMAIL PROTECTED] execution(public *
POJO->someMethod(..))
| iterate binding 1225222694453:0
| [debug] added advisor: POJO from binding: 1225222694453:0
| method matched binding execution(public * POJO->someMethod(..)) public void
POJO.someMethod()
| --- new POJO(); ---
| in empty constructor
| --- adding instance interceptors ---
| --- pojo.someMethod(); ---
| <<< Entering Simplenterceptor for: POJO$someMethod_2315001504750198986
| in someMethod
|
Thank you for the help.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185206#4185206
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185206
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user