1 Reply Latest reply on Apr 2, 2008 2:31 AM by Jeroen Wenting

    Why interceptors can't be deployed using ejb-jar.xml?

    Jin Shao Newbie

      Hi, I'm trying to get familiar with the interceptors in ejb3. I succeeded in using it with annotations, and it worked well. But when I remove the @Interceptors and put <interceptor-binding> in the ejb-jar.xml, the interceptor doesn't work.
      Here is the ejb-jar.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <ejb-jar
       xmlns="http://java.sun.com/xm./ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
       http://java.sun.com/xml/ns/javaee/ejb-jar_3.0.xsd"
       version="3.0">
      
       <assembly-description>
       <interceptor-binding>
       <ejb-name>HelloWorldBean</ejb-name>
       <interceptor-class>com.abc.interceptors.Profiler</interceptor-class>
       </interceptor-binding>
       </assembly-description>
      </ejb-jar>
      


      Thanks in advance for any help!