title: Interceptor method not being invoked
body: <p>I have written the following test code for testing InterceptorBinding in EJB as explained <a href="http://blogs.oracle.com/arungupta/entry/totd_134_interceptors_1_1" rel="nofollow">here</a>:</p>
  
  <p>Bean Class:</p>
  
  <pre><code>@Stateless
  @LocalBean
  @Interceptors ({LoggingInterceptor.class})
  public class TestInterceptor {
  
   @PostConstruct
   public int func1()
   {
       System.out.println("here1");
       return 0;
   }
  
   public void func2()
   {
       System.out.println("here2");
   }
  
   public static void main(String[] args)
   {
      TestInterceptor t = new TestInterceptor();
      t.func1();
      t.func2();
   }
  }
  </code></pre>
  
  <p>Interceptor Binding:</p>
  
  <pre><code>@InterceptorBinding
  @Target(value = {ElementType.METHOD, ElementType.TYPE})
  @Retention(RetentionPolicy.RUNTIME)
  public @interface Log {
  }
  </code></pre>
  
  <p>Interceptor:
      @Interceptor
      @Log
      public class LoggingInterceptor {</p>
  
  <pre><code> private java.util.logging.Logger logger =
          java.util.logging.Logger.getLogger("theLogger");
  
   @AroundInvoke
   public Object intercept(InvocationContext context) throws Exception {
       logger.log(Level.INFO, "here ", context.getMethod().getName());
       return context.proceed();
   }
  
  }
  </code></pre>
  
  <p>JSP file:</p>
  
  <pre><code>&lt;%@page import="test.TestInterceptor"%&gt;
  &lt;%@page import="javax.ejb.EJB"%&gt;
  &lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd"&gt;
  
  &lt;html&gt;
   &lt;head&gt;
       &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;JSP Page&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
       &lt;h1&gt;Hello World!&lt;/h1&gt;
       &lt;%
    TestInterceptor object = new TestInterceptor();
    %&gt;
    &lt;%=object.func1()%&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>However the intercept method is not being invoked. Can you please help me identify the problem?</p>