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

package org.jboss.test.aop.annotated;

import org.jboss.aop.joinpoint.Invocation;

/**
 *
 * @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
 * @version $Revision: 1.1.8.2 $
 * @@org.jboss.aop.Aspect (scope=org.jboss.aop.advice.Scope.PER_VM)
 */
public class PrecedenceAspect1
{
   /**
    * @@org.jboss.aop.Bind (pointcut="execution(* org.jboss.test.aop.annotated.VariaPOJO->precedenceMethod())")
    */
   public Object advice1(Invocation invocation) throws Throwable
   {
      Interceptions.add("PrecedenceAspect1.advice1");
      System.out.println("PrecedenceAspect.advice1");
      return invocation.invokeNext();      
   }

   /**
    * @@org.jboss.aop.Bind (pointcut="execution(* org.jboss.test.aop.annotated.VariaPOJO->precedenceMethod())")
    */
   public Object advice2(Invocation invocation) throws Throwable
   {
      Interceptions.add("PrecedenceAspect1.advice2");
      System.out.println("PrecedenceAspect1.advice2");
      return invocation.invokeNext();      
   }
}