1 Reply Latest reply on Jun 7, 2005 4:33 AM by Kabir Khan

    helo me!come in!

    andy hui Newbie


      public class ServiceRequest{
      //do some thing

      public class MyService{
      public void method1(ServiceRequest request,String str);
      //many methods that has a ServiceRequest argument
      public Object method2();//none Arguments

      public class MyInterceptor implements Interceptor {
       public MyInterceptor() {
       public String getName() {
       return "MyInterceptor";
       public Object invoke(Invocation invocation) throws Throwable {
       MethodInvocation mi = (MethodInvocation)invocation;
       ServiceRequest request = (ServiceRequest)mi.getArguments()[0];
       //I get the ServiceRequest,do some thing ...
       return invocation.invokeNext();

      now i want to make MyInterceptor to intercept the methods that has a ServiceRequest argument of MyService !
      how can i write the jboss-aop.xml

      Thanks...very much....