0 Replies Latest reply on Aug 3, 2010 11:16 AM by ashirman

    how to use JBoss AOP with portlets


      Hello everyone,


      probably my question is very stiuped but I'm just start studying JBoss AOP....

      So, I would like to use Jboss AOP together with Portlet (IPC). I have to use Jetspeed as Apache server (it is not my mind - it is part of my task..)

      Well I have created simple application where AOP stuff should be used every time when the doView portlet's metod is called. The ANT compiles my project in Ecllipce without any error ant it can be deployed on Jetspeed. But... I have not got any results from AOP. It looks like AOP's functions do not call at all.

      Source code below:


           public class AOPTestAspect {
               public Object run(MethodInvocation invocation) throws Throwable {
                  System.out.println("Hello from Aspect");
                  return invocation.invokeNext();


      public class IPCEAOPPortlet extends javax.portlet.GenericPortlet
          public void doView(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response)
          throws javax.portlet.PortletException, java.io.IOException
              response.getWriter().println("Hello world!");


      jboss-aop looks like



         <bind pointcut="execution(void IPCEAOPPortlet->doView(..))">
            <around aspect="aoptest.AOPTestAspect" name="run"></around>


      Could anybody to explane me where I maek a misprints?

      Probably there is a clear explanation in docs or are there examples of AOP's using with portlets?


      Thanks a lot,