3 Replies Latest reply on Mar 31, 2006 10:54 PM by tterm

    separate container configurations

    tterm

      Hello,

      Is it possible to have separate container configurations like in ejb2 with the jboss.xml descriptor?

      I need for different Stateless Session Beans different Interceptor-Stacks. I would like to extend the default configuration for each Bean.

      If yes how does it work?

      Thomas

        • 1. Re: separate container configurations
          bdecoste

          The best way to add interceptors is to use the @Interceptors and/or @AroundInvoke annotations in the beans themselves. There are corresponding interceptors/interceptor/around-invoke tags in the ejb-jar.xml schema.

          • 2. Re: separate container configurations
            bdecoste

            If you need to replace the whole stack, you can also deploy your own *-ejb3-interceptors-aop.xml file that contains the container interceptor stack. Reference the domain with the @AspectDomain annotation.

            For example:

            <aop>
             <interceptor class="org.jboss.ejb3.test.aspectdomain.TestInterceptor" scope="PER_VM"/>
            
             <domain name="Test Aspect Domain">
             <bind pointcut="execution(* *->*(..))">
             <interceptor-ref name="org.jboss.ejb3.test.aspectdomain.TestInterceptor"/>
             </bind>
             </domain>
            </aop>
            


            @AspectDomain("Test Aspect Domain")
            


            • 3. Re: separate container configurations
              tterm

              Thank you,

              That is exactly what I want!

              And it is the @RemoteBinding(interceptorStack="TestStack") to add another Stack for the client side.


              Thomas