2 Replies Latest reply on Nov 13, 2003 3:44 PM by sradford

    unable to get methodFilter to work

    sradford

      Hi,

      I'm unable to get methodFilter to work. Any ideas?

      <interceptor-pointcut class="my.class.Myclass" methodName=".*" methodFilter="PUBLIC">

      <interceptor-ref name="SimpleLogger"/>

      </interceptor-pointcut>

      The above 'intercepts' all method types... (I've tried a method-interceptor with the same outcome).

      Thanks in advanced,

      Sean

        • 1. Re: unable to get methodFilter to work
          adegbile

          Try using this
          method-filter: String defining which methods are allowed to be instrumented.

          "ALL" or "NONE" or a combination of the following (combined using a logical OR character '|'). "PUBLIC", "PRIVATE", "PROTECTED", "PACKAGE_PROTECTED", "MEMBER", "STATIC".

          Example below
          <?xml version="1.0" encoding="UTF-8"?>




          <interceptor-pointcut class="InterceptedPOJO">



          </interceptor-pointcut>



          Kind Regards
          Adeyemi E Adegbile

          • 2. Re: unable to get methodFilter to work
            sradford

            Well I've come back to this problem and the follwoing works for me...

            <method-pointcut class="^mypackage\.mysubpackage\.Myclass$" methodName="^doSomething$">



            </method-pointcut>