5 Replies Latest reply on Feb 28, 2006 12:23 PM by oglueck

    Custom org.jboss.ejb.Interceptor

    Novice

      I am trying to add an Interceptor to the chain, but without success. Does this actually work with EJB3 session beans? Because when I set a break-point in my bean in the debugger the stack shows lots of AOP interceptors, but none of the interceptors from the container-configuration.
      And I don't need to list the session bean in the ejb-jar.xml if I use annotations, right?

      My jboss.xml is:

      <jboss>
       <enterprise-beans>
       <session>
       <ejb-name>MyBean</ejb-name>
       <configuration-name>My Stateless SessionBean</configuration-name>
       </session>
       </enterprise-beans>
       <container-configurations>
       <container-configuration extends="Standard Stateless SessionBean">
       <container-name>My Stateless SessionBean</container-name>
       <container-interceptors>
       <interceptor>org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor</interceptor>
       <interceptor>org.jboss.ejb.plugins.CleanShutdownInterceptor</interceptor>
       <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</interceptor>
      <!-- I WANT THIS ONE TO LOAD -->
       <interceptor>my.test.Log4JInterceptor</interceptor>
       <!-- CMT -->
       <interceptor transaction="Container">org.jboss.ejb.plugins.TxInterceptorCMT</interceptor>
       <interceptor transaction="Container">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
       <interceptor transaction="Container">org.jboss.webservice.server.ServiceEndpointInterceptor </interceptor>
       <interceptor transaction="Container">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
       <!-- BMT -->
       <interceptor transaction="Bean">org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor</interceptor>
       <interceptor transaction="Bean">org.jboss.ejb.plugins.TxInterceptorBMT</interceptor>
       <interceptor transaction="Bean">org.jboss.ejb.plugins.CallValidationInterceptor</interceptor>
       <interceptor transaction="Bean">org.jboss.webservice.server.ServiceEndpointInterceptor </interceptor>
       <interceptor>org.jboss.resource.connectionmanager.CachedConnectionInterceptor</interceptor>
       </container-interceptors>
       </container-configuration>
       </container-configurations>
      </jboss>