org.objectweb.easybeans.tests.interceptors.business
Class TestMiscInterceptor00

java.lang.Object
  extended by org.objectweb.easybeans.tests.interceptors.business.TestMiscInterceptor00

public class TestMiscInterceptor00
extends java.lang.Object

Verify if the order to execute the method and callbacks interceptors is correct, also verify the interceptors inheritance. The correct order is:

  • Default Interceptor in the order of theirs specification.
  • Interceptor Classes in the order of theirs specification.
  • Interceptor Methods in the order of theirs specification.
  • Interceptors annotated to a business method in the order of theirs specification.

  • The bean used to the test has one interceptor.

    Author:
    Eduardo Studzinski Estima de Castro, Gisele Pinheiro Souza
    Reference:
    JSR220-PROPOSED FINAL - Item: 11.3.1
    Requirement:
    Application Server must be running; the bean org.objectweb.easybeans.tests.common.ejbs.stateless.SLSBSimpleInterceptorTest.java must be deployed.
    Setup:
    gets the reference of SLSBSimpleInterceptorTest00, SLSBSimpleInterceptorTest01, SLSBSimpleInterceptorTest02

    Field Summary
    private  ItfSimpleBeanRemote<java.lang.Integer> mtBean00
              Bean used to implement the test.
    private  ItfSimpleBeanRemote<java.lang.Integer> mtBean01
              Bean used to implement the test.
    private  ItfSimpleBeanRemote<java.lang.Integer> mtBean02
              Bean used to implement the test.
     
    Constructor Summary
    TestMiscInterceptor00()
               
     
    Method Summary
     void startUp()
              Creates beans to be used in the tests.
     void testMiscInheritanceInterCallOrder00()
              Verifies if the interceptors are following the order of declaration.
     void testMiscInheritanceInterCallOrder01()
              Verifies if the interceptors are following the order of declaration.
     void testMiscInheritanceInterCallOrder02()
              Verifies if the interceptors are following the order of declaration.
     void testMiscInterCallOrder00()
              Verifies if the interceptors are following the order of declaration.
     void testMiscPrivateInterCallOrder02()
              Verifies if the interceptors are following the order of declaration.
     void testMiscPublicInterCallOrder01()
              Verifies if the interceptors are following the order of declaration.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    mtBean00

    private ItfSimpleBeanRemote<java.lang.Integer> mtBean00
    Bean used to implement the test.


    mtBean01

    private ItfSimpleBeanRemote<java.lang.Integer> mtBean01
    Bean used to implement the test.


    mtBean02

    private ItfSimpleBeanRemote<java.lang.Integer> mtBean02
    Bean used to implement the test.

    Constructor Detail

    TestMiscInterceptor00

    public TestMiscInterceptor00()
    Method Detail

    startUp

    public void startUp()
                 throws java.lang.Exception
    Creates beans to be used in the tests.

    Throws:
    java.lang.Exception - if there is a problem with the bean initialization.

    testMiscInterCallOrder00

    public void testMiscInterCallOrder00()
    Verifies if the interceptors are following the order of declaration. There is an interceptor inside the bean class that has public modifier access.

    Input:
    List with no values inside
    Output:
    List with 4 values, the value inserted by the method and value inserted by the interceptors.

    testMiscPublicInterCallOrder01

    public void testMiscPublicInterCallOrder01()
    Verifies if the interceptors are following the order of declaration. There is an interceptor inside the bean class that has protected modifier access.

    Input:
    List with no values inside
    Output:
    List with 4 values, the value inserted by the method and value inserted by the interceptors.

    testMiscPrivateInterCallOrder02

    public void testMiscPrivateInterCallOrder02()
    Verifies if the interceptors are following the order of declaration. There is an interceptor inside the bean class that has private modifier access.

    Input:
    List with no values inside
    Output:
    List with 4 values, the value inserted by the method and value inserted by the interceptors.

    testMiscInheritanceInterCallOrder00

    public void testMiscInheritanceInterCallOrder00()
    Verifies if the interceptors are following the order of declaration. There is an interceptor inside the bean class that has public modifier access.

    Input:
    List with no values inside
    Output:
    List with 4 values, the value inserted by the method and value inserted by the interceptors.

    testMiscInheritanceInterCallOrder01

    public void testMiscInheritanceInterCallOrder01()
    Verifies if the interceptors are following the order of declaration. There is an interceptor inside the bean class that has protected modifier access.

    Input:
    List with no values inside
    Output:
    List with 4 values, the value inserted by the method and value inserted by the interceptors.

    testMiscInheritanceInterCallOrder02

    public void testMiscInheritanceInterCallOrder02()
    Verifies if the interceptors are following the order of declaration. There is an interceptor inside the bean class that has private modifier access.

    Input:
    List with no values inside
    Output:
    List with 4 values, the value inserted by the method and value inserted by the interceptors.