/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.InterceptorDef;
import org.jboss.aop.Bind;

/**
 *
 * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
 * @version $Revision: 1.1.8.2 $
 */
@InterceptorDef
@Bind (pointcut = "all($typedef{SimpleInterceptor.myTypedef})")
public class SimpleInterceptor2 implements Interceptor
{
   public String getName() { return "SimpleInterceptor2"; }

   public Object invoke(Invocation invocation) throws Throwable
   {
      try
      {
         System.out.println("<<< Entering SimpleInterceptor2");
         return invocation.invokeNext();
      }
      finally
      {
         System.out.println(">>> Leaving SimpleInterceptor2");
      }
   }
}
