0 Replies Latest reply on Jul 3, 2012 1:16 PM by lavcraft

    JBoss AS 6.1 Interceptors

    lavcraft

      I try to create global interseptor with AOP in JBoss AS 6.1. I take realisation of standard JBoss interseptor

      http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.ejb3/jboss-ejb3-core/1.7.20/org/jboss/ejb3/async/impl/interceptor/AsynchronousServerInterceptor.java

      , rename its class name and try to connect this interseptor to JBoss AOP (in JBoss AS).

       

      I add to server/all/deploy/ejb3-interceptors-aop.xml file the next strings:

       

      <interceptor class="org.ctc.hibernate.interceptors.TestInterceptor" scope="PER_VM"/>

       

      <domain name="Intercepted Bean">
          <bind pointcut="execution(public * *->getInt(..))">
              <interceptor-ref class="org.jboss.ejb3.TestInterceptor"/>
         </bind>
      . . .
      </domain>

       

      Then I try to start JBoss AS and it write this exception:
      20:53:44,401 ERROR [AbstractKernelController] Error resolving dependencies for Configured: name=3j001-7s1upj-h477vpzd-1-h477vtnp-37$0 state=Instantiated: java.lang.IllegalArgumentException: Null name
      (See http://pastebin.com/ZJRyGyFs - all log )