2 Replies Latest reply on Apr 7, 2005 4:08 PM by Balamaci Serban

    New to jboss aop

    Balamaci Serban Newbie

      Hi guys. I'm kinda freakin out, i can't succed at all with this AOP stuff.
      Got the

      package com.balamaci;
      public class FunctionarBean implements SessionBean {
      ..
      ..
      public void SNAPSHOT()
       {
       System.err.println("Say hello");
       }
      }
      

      also this
      package com.balamaci;
      import ...
      public class SimpleInterceptor implements Interceptor{
       public String getName() {
       System.err.println("SimpleInterceptor");
       System.out.println("<<< Entering SimpleInterceptor");
       return "SimpleInterceptor";
       }
      
       public Object invoke(Invocation invocation) throws Throwable
       {
       try
       {
       System.err.println("<<< Entering SimpleInterceptor");
       System.out.println("<<< Entering SimpleInterceptor");
       return invocation.invokeNext();
       }
       finally
       {
       System.err.println(">>> Leaving SimpleInterceptor");
       }
       }
      }
      

      Created in the META-INF a jboss-aop.xml looks like this






      Yeah, well it took me two hours to understand i was missing a ), but nevermind..

      So i bundle up this fellas up and nice in a jar. Off with them in the /default/deploy/Test directory. I lookup the bean and call SNAPSHOT, get the Hello message but nothing else. I delete the jboss-aop.xml from the META-INF, and recreate the jar. I create it in the /default/deploy/Test/META-INF and put there the jboss-aop.xml. Still nothing else. I begin to change to execution(* com.balamaci.FunctionarBean->SNAPSHOT(..))"
      ,even to execution(* com.balamaci.FunctionarBean->setSessionContext(..))" still to no avail. Please, am I doing something wrong here? It can't find the com.balamaci.SimpleInterceptor class? It doesn't complain when i mistype it.

      It's been like 5 hours now and it's getting really depresing.