1 Reply Latest reply on Jun 7, 2005 4:47 AM by kabirkhan

    AOP Problem with java.io.PrintStream

      Hi,

      I'm new to AOP and have been trying to get a sample running to add an interceptor when the java.io.PrintStream print() method is called.

      My jboss-aop.xml file contains this bind:

      <bind pointcut="call(* java.io.PrintStream->print(java.lang.String)) AND within(HelloAOP)">
       <interceptor class="HelloObjectInterceptor"/>
       </bind>


      I then have an interceptor class which outputs some other info (to System.err). My main class then calls System.out.print but it doesn't appear to run the interceptor. I don't get any errors.

      Any ideas?

      Thanks

      Chris