You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org> on 2010/09/21 21:46:38 UTC

[jira] Created: (OWB-456) When multiple interceptors are defined for a bean OWB does NOT correctly remove the overriden base Interceptors

When multiple interceptors  are defined for a bean OWB does NOT correctly  remove the overriden base Interceptors 
------------------------------------------------------------------------------------------------------------------

                 Key: OWB-456
                 URL: https://issues.apache.org/jira/browse/OWB-456
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Interceptor and Decorators
    Affects Versions: 1.0.0-alpha-3
         Environment: Windows Server 2003 
            Reporter: Rohit Dilip Kelapure
            Assignee: Gurkan Erdogdu
             Fix For: 1.0.0-GA, 1.0.0-alpha-4


OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 

@Test
   @SpecAssertions({
      @SpecAssertion(section = "1", id = "i"),
      @SpecAssertion(section = "3", id= "b"),
      @SpecAssertion(section = "3.1", id= "c"),
      @SpecAssertion(section = "3.1", id= "d"),
      @SpecAssertion(section = "3.1", id= "e"),
      @SpecAssertion(section = "3.1", id= "f"),
      @SpecAssertion(section = "3.1", id= "g"),
      @SpecAssertion(section = "8", id = "e")
   })
   public void testInvocationOrder() {
      ...
      assert !Interceptor1.isOverridenMethodCalled();  // Error here
   }

Error:
java.lang.AssertionError
	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

In this case
@Interceptors( { Interceptor1.class, Interceptor3.class })
class Tram extends RailVehicle  {
}

Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OWB-456) When multiple interceptors are defined for a bean OWB does NOT correctly remove the overriden base Interceptors

Posted by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Dilip Kelapure updated OWB-456:
-------------------------------------

    Description: 
EJB 3.0 spec. mandates that 
- If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.
- If an AroundInvoke method is overridden by another method (regardless of whether that method is itself an AroundInvoke method), it will not be invoked 

In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 

@Test
   @SpecAssertions({
      @SpecAssertion(section = "1", id = "i"),
      @SpecAssertion(section = "3", id= "b"),
      @SpecAssertion(section = "3.1", id= "c"),
      @SpecAssertion(section = "3.1", id= "d"),
      @SpecAssertion(section = "3.1", id= "e"),
      @SpecAssertion(section = "3.1", id= "f"),
      @SpecAssertion(section = "3.1", id= "g"),
      @SpecAssertion(section = "8", id = "e")
   })
   public void testInvocationOrder() {
      ...
      assert !Interceptor1.isOverridenMethodCalled();  // Error here
   }

Error:
java.lang.AssertionError
	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

In this case
@Interceptors( { Interceptor1.class, Interceptor3.class })
class Tram extends RailVehicle  {
}

Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

  was:
EJB 3.0 spec. mandates that 
- If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.

In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 

@Test
   @SpecAssertions({
      @SpecAssertion(section = "1", id = "i"),
      @SpecAssertion(section = "3", id= "b"),
      @SpecAssertion(section = "3.1", id= "c"),
      @SpecAssertion(section = "3.1", id= "d"),
      @SpecAssertion(section = "3.1", id= "e"),
      @SpecAssertion(section = "3.1", id= "f"),
      @SpecAssertion(section = "3.1", id= "g"),
      @SpecAssertion(section = "8", id = "e")
   })
   public void testInvocationOrder() {
      ...
      assert !Interceptor1.isOverridenMethodCalled();  // Error here
   }

Error:
java.lang.AssertionError
	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

In this case
@Interceptors( { Interceptor1.class, Interceptor3.class })
class Tram extends RailVehicle  {
}

Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	


> When multiple interceptors  are defined for a bean OWB does NOT correctly  remove the overriden base Interceptors 
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-456
>                 URL: https://issues.apache.org/jira/browse/OWB-456
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.0.0-alpha-3
>         Environment: Windows Server 2003 
>            Reporter: Rohit Dilip Kelapure
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.0.0-GA, 1.0.0-alpha-4
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> EJB 3.0 spec. mandates that 
> - If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.
> - If an AroundInvoke method is overridden by another method (regardless of whether that method is itself an AroundInvoke method), it will not be invoked 
> In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 
> @Test
>    @SpecAssertions({
>       @SpecAssertion(section = "1", id = "i"),
>       @SpecAssertion(section = "3", id= "b"),
>       @SpecAssertion(section = "3.1", id= "c"),
>       @SpecAssertion(section = "3.1", id= "d"),
>       @SpecAssertion(section = "3.1", id= "e"),
>       @SpecAssertion(section = "3.1", id= "f"),
>       @SpecAssertion(section = "3.1", id= "g"),
>       @SpecAssertion(section = "8", id = "e")
>    })
>    public void testInvocationOrder() {
>       ...
>       assert !Interceptor1.isOverridenMethodCalled();  // Error here
>    }
> Error:
> java.lang.AssertionError
> 	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> In this case
> @Interceptors( { Interceptor1.class, Interceptor3.class })
> class Tram extends RailVehicle  {
> }
> Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
> org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OWB-456) When multiple interceptors are defined for a bean OWB does NOT correctly remove the overriden base Interceptors

Posted by "Eric Covener (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Covener resolved OWB-456.
------------------------------

      Assignee: Eric Covener  (was: Gurkan Erdogdu)
    Resolution: Fixed

Thanks Rohit -- committed in r1002180.

> When multiple interceptors  are defined for a bean OWB does NOT correctly  remove the overriden base Interceptors 
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-456
>                 URL: https://issues.apache.org/jira/browse/OWB-456
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.0.0-alpha-3
>         Environment: Windows Server 2003 
>            Reporter: Rohit Dilip Kelapure
>            Assignee: Eric Covener
>             Fix For: 1.0.0-GA, 1.0.0-alpha-4
>
>         Attachments: OWB-456.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> EJB 3.0 spec. mandates that 
> - If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.
> - If an AroundInvoke method is overridden by another method (regardless of whether that method is itself an AroundInvoke method), it will not be invoked 
> In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 
> @Test
>    @SpecAssertions({
>       @SpecAssertion(section = "1", id = "i"),
>       @SpecAssertion(section = "3", id= "b"),
>       @SpecAssertion(section = "3.1", id= "c"),
>       @SpecAssertion(section = "3.1", id= "d"),
>       @SpecAssertion(section = "3.1", id= "e"),
>       @SpecAssertion(section = "3.1", id= "f"),
>       @SpecAssertion(section = "3.1", id= "g"),
>       @SpecAssertion(section = "8", id = "e")
>    })
>    public void testInvocationOrder() {
>       ...
>       assert !Interceptor1.isOverridenMethodCalled();  // Error here
>    }
> Error:
> java.lang.AssertionError
> 	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> In this case
> @Interceptors( { Interceptor1.class, Interceptor3.class })
> class Tram extends RailVehicle  {
> }
> Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
> org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OWB-456) When multiple interceptors are defined for a bean OWB does NOT correctly remove the overriden base Interceptors

Posted by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Dilip Kelapure updated OWB-456:
-------------------------------------

    Attachment: OWB-456.patch

After running with this patch I see the following results with logging enabled

PASSED: testInvocationOrder
===============================================
    org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest
    Tests run: 1, Failures: 0, Skips: 0
===============================================


openwebbeans>mvn test
Results :
Failed tests:
  testInterceptorPerformance(org.apache.webbeans.newtests.interceptors.business.tests.InterceptorPerformanceTest)
Tests run: 263, Failures: 1, Errors: 0, Skipped: 1

Web Profile TCK
==============================================
    JSR-299 TCK
    Tests run: 513, Failures: 0, Skips: 0
===============================================

STANDALONE TCK
===============================================
    JSR-299 TCK
    Tests run: 574, Failures: 0, Skips: 0
===============================================







> When multiple interceptors  are defined for a bean OWB does NOT correctly  remove the overriden base Interceptors 
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-456
>                 URL: https://issues.apache.org/jira/browse/OWB-456
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.0.0-alpha-3
>         Environment: Windows Server 2003 
>            Reporter: Rohit Dilip Kelapure
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.0.0-GA, 1.0.0-alpha-4
>
>         Attachments: OWB-456.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> EJB 3.0 spec. mandates that 
> - If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.
> - If an AroundInvoke method is overridden by another method (regardless of whether that method is itself an AroundInvoke method), it will not be invoked 
> In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 
> @Test
>    @SpecAssertions({
>       @SpecAssertion(section = "1", id = "i"),
>       @SpecAssertion(section = "3", id= "b"),
>       @SpecAssertion(section = "3.1", id= "c"),
>       @SpecAssertion(section = "3.1", id= "d"),
>       @SpecAssertion(section = "3.1", id= "e"),
>       @SpecAssertion(section = "3.1", id= "f"),
>       @SpecAssertion(section = "3.1", id= "g"),
>       @SpecAssertion(section = "8", id = "e")
>    })
>    public void testInvocationOrder() {
>       ...
>       assert !Interceptor1.isOverridenMethodCalled();  // Error here
>    }
> Error:
> java.lang.AssertionError
> 	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> In this case
> @Interceptors( { Interceptor1.class, Interceptor3.class })
> class Tram extends RailVehicle  {
> }
> Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
> org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OWB-456) When multiple interceptors are defined for a bean OWB does NOT correctly remove the overriden base Interceptors

Posted by "Rohit Dilip Kelapure (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rohit Dilip Kelapure updated OWB-456:
-------------------------------------

    Description: 
EJB 3.0 spec. mandates that 
- If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.

In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 

@Test
   @SpecAssertions({
      @SpecAssertion(section = "1", id = "i"),
      @SpecAssertion(section = "3", id= "b"),
      @SpecAssertion(section = "3.1", id= "c"),
      @SpecAssertion(section = "3.1", id= "d"),
      @SpecAssertion(section = "3.1", id= "e"),
      @SpecAssertion(section = "3.1", id= "f"),
      @SpecAssertion(section = "3.1", id= "g"),
      @SpecAssertion(section = "8", id = "e")
   })
   public void testInvocationOrder() {
      ...
      assert !Interceptor1.isOverridenMethodCalled();  // Error here
   }

Error:
java.lang.AssertionError
	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

In this case
@Interceptors( { Interceptor1.class, Interceptor3.class })
class Tram extends RailVehicle  {
}

Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

  was:
OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 

@Test
   @SpecAssertions({
      @SpecAssertion(section = "1", id = "i"),
      @SpecAssertion(section = "3", id= "b"),
      @SpecAssertion(section = "3.1", id= "c"),
      @SpecAssertion(section = "3.1", id= "d"),
      @SpecAssertion(section = "3.1", id= "e"),
      @SpecAssertion(section = "3.1", id= "f"),
      @SpecAssertion(section = "3.1", id= "g"),
      @SpecAssertion(section = "8", id = "e")
   })
   public void testInvocationOrder() {
      ...
      assert !Interceptor1.isOverridenMethodCalled();  // Error here
   }

Error:
java.lang.AssertionError
	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

In this case
@Interceptors( { Interceptor1.class, Interceptor3.class })
class Tram extends RailVehicle  {
}

Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	


> When multiple interceptors  are defined for a bean OWB does NOT correctly  remove the overriden base Interceptors 
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: OWB-456
>                 URL: https://issues.apache.org/jira/browse/OWB-456
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.0.0-alpha-3
>         Environment: Windows Server 2003 
>            Reporter: Rohit Dilip Kelapure
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.0.0-GA, 1.0.0-alpha-4
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> EJB 3.0 spec. mandates that 
> - If a bean class has superclasses, any AroundInvoke methods defined on those superclasses are invoked, most general superclass first.
> In some cases OWB does not remove the overriden parent interceptor from the Interceptor stack of a bean leading to TCK failures like these ... 
> @Test
>    @SpecAssertions({
>       @SpecAssertion(section = "1", id = "i"),
>       @SpecAssertion(section = "3", id= "b"),
>       @SpecAssertion(section = "3.1", id= "c"),
>       @SpecAssertion(section = "3.1", id= "d"),
>       @SpecAssertion(section = "3.1", id= "e"),
>       @SpecAssertion(section = "3.1", id= "f"),
>       @SpecAssertion(section = "3.1", id= "g"),
>       @SpecAssertion(section = "8", id = "e")
>    })
>    public void testInvocationOrder() {
>       ...
>       assert !Interceptor1.isOverridenMethodCalled();  // Error here
>    }
> Error:
> java.lang.AssertionError
> 	at org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest.testInvocationOrder(InvocationOrderTest.java:43)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> In this case
> @Interceptors( { Interceptor1.class, Interceptor3.class })
> class Tram extends RailVehicle  {
> }
> Inspite of Interceptor1 overriding OverridenInterceptor we see  OverridenInterceptor.intercept being called.
> org.jboss.jsr299.tck.interceptors.tests.aroundInvoke.order.InvocationOrderTest is the failing TCK test.	

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.