-
1. Re: DynamicAOP not working with Examples
kabirkhan Mar 9, 2006 5:51 AM (in response to tpedone)That is bizarre. I just tried it here, and it worked as expected. Did you change the example in any way?
-
2. Re: DynamicAOP not working with Examples
tpedone Mar 9, 2006 11:27 AM (in response to tpedone)No I didn't. I just built it. One thing that may be different is that I installed my copy of JBoss using the jar installer since we're using EJB3. I'll try it using the standard JBoss zip distribution and post the results here.
Tim -
3. Re: DynamicAOP not working with Examples
tpedone Mar 9, 2006 12:08 PM (in response to tpedone)OK I tried this on a fresh copy of JBoss 4.0.3SP1 that was simply unzipped to a directory and it worked.
I then used the jar installer to install JBoss using the "all" configuration and got the same error as I reported in my original post.
In both cases I used the same procedure to update AOP (removed the old AOP deploy dir, copy the new one, put the pluggable-instrumentor.jar in the bin dir and added -javaagent:pluggable-instrumentor.jar to the JAVA_OPTS in run.bat.
BTW, I when I installed using the jar installer, I did it twice, once with the "Enable deployment isolation/call by value" checked and once with in unchecked. Both failed.
Tim -
4. Re: DynamicAOP not working with Examples
kabirkhan Mar 9, 2006 12:50 PM (in response to tpedone)I've created a JIRA issue
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3929100#3929100
Thanks for investigating.
You're able to use it with the unzipped version right? -
5. Re: DynamicAOP not working with Examples
tpedone Mar 9, 2006 3:50 PM (in response to tpedone)The unzipped version worked. We have been using the installed version. I'll have to try installing EJB3 manually into the unzipped version and see if that works. If so, then we can proceed using that for now.
-
6. Re: DynamicAOP not working with Examples
tpedone Mar 9, 2006 7:48 PM (in response to tpedone)The example worked when I ran it in the unzipped JBoss distribution with a manually installed EJB3 RC3 installation. So, it appears to only fail when running in an instance installed with the jar installer installing the "all" configuration.
-
7. Re: DynamicAOP not working with Examples
kabirkhan Mar 12, 2006 7:23 AM (in response to tpedone)The installer seems to incorrectly set Isolated and CallByValue to true regardless of what you select, so I got the same errors as you.
Changing these values to false in ear-deployer.xml fixes the problem. -
8. Re: DynamicAOP not working with Examples
tpedone Mar 13, 2006 7:24 PM (in response to tpedone)After trying to get my own aspects to work, I went back to example and noticed that not all the interceptors are working when I re-deploy the jboss-aop.xml. In particular, ExampleSessionBean.getValue() and EarExampleServlet.service() are not intercepted even though they were when I first deployed the aopexample.ear. I'm having a similar problem with my app. After removing, then re-deploying my aop.xml file, my interceptors stop working.
It's as if the interceptors only work only on instances that were constructed since re-deploying the aop.xml file (hence the value objects constructors and method calls are still being intercepted)
Is there a limitation as to what can be dynamically intercepted?
Thanks,
Tim -
9. Re: DynamicAOP not working with Examples
kabirkhan Mar 15, 2006 10:16 AM (in response to tpedone)I will try to look at your problem in the not too distant future
-
10. Re: DynamicAOP not working with Examples
kabirkhan Mar 20, 2006 5:51 AM (in response to tpedone)I could reproduce your problem, you can track progress here:
http://jira.jboss.com/jira/browse/JBAOP-217 -
11. Re: DynamicAOP not working with Examples
kabirkhan Mar 23, 2006 8:00 AM (in response to tpedone)The problem is to do with the bindings using $typedef{} not being picked up properly on redeploy.
I'll fix in cvs, in the meantime change<typedef name="MyServlets" expr="class($instanceof{javax.servlet.http.HttpServlet}) AND class(org.jboss.injbossaop.web.*)"/> <bind pointcut="execution(* $typedef{MyServlets}->service(..))"> <interceptor class="org.jboss.injbossaop.lib.SimpleInterceptor"/> </bind> <typedef name="MySessionBeans" expr="class($instanceof{javax.ejb.SessionBean}) AND class(org.jboss.injbossaop.ejb.*)" /> <bind pointcut="execution(* $typedef{MySessionBeans}->getValue(..))"> <interceptor class="org.jboss.injbossaop.lib.SimpleInterceptor"/> </bind>
to<bind pointcut="execution(* org.jboss.injbossaop.web.EarExampleServlet->service(..))"> <interceptor class="org.jboss.injbossaop.lib.SimpleInterceptor"/> </bind> <bind pointcut="execution(* org.jboss.injbossaop.ejb.ExampleSessionBean->getValue(..))"> <interceptor class="org.jboss.injbossaop.lib.SimpleInterceptor"/> </bind>