You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Ivan (JIRA)" <ji...@apache.org> on 2011/06/20 07:29:47 UTC
[jira] [Created] (OPENEJB-1602) Interceptors are not sorted
correctly while intercept-ordering is used on override method name style
Interceptors are not sorted correctly while intercept-ordering is used on override method name style
----------------------------------------------------------------------------------------------------
Key: OPENEJB-1602
URL: https://issues.apache.org/jira/browse/OPENEJB-1602
Project: OpenEJB
Issue Type: Bug
Components: interceptors
Affects Versions: 4.0
Reporter: Ivan
Assignee: Ivan
Fix For: 4.0
In current OpenEJB interceptor sorting algorithm, four levels are defined : PACKAGE, CLASS, OVERLOADED_METHOD, EXACT_METHOD. While from the spec side, it only configures three level : PACKAGE, CLASS, METHOD, And the OVERLOADED_METHOD is a solution to configure some methods with the same name at once. In the sample below, we will got a incorrect interceptor ordering :
class MyBean {
@Interceptors{{Interceptor1.class, Interceptor2.class}}
public method1()
}
In the deployment plan, we have the configurations below :
<interceptor-binding>
<ejb-name>MyBean </ejb-name>
<interceptor-order>
<interceptor-class>org.apache.openejb.interceptor.Interceptor2</interceptor-class>
<interceptor-class>org.apache.openejb.interceptor.Interceptor1</interceptor-class>
</interceptor-order>
<method>
<method-name>method1</method-name>
</method>
</interceptor-binding>
Per the description in the spec about interceptor-order, the final order should be interceptor2 -> interceptor1. while now the final order is interceptor1, interceptor2, interceptor2, interceptor1. The root cause for it is that we have an extra level.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OPENEJB-1602) Interceptors are not sorted
correctly while intercept-ordering is used on override method name style
Posted by "Jean-Louis MONTEIRO (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENEJB-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Louis MONTEIRO closed OPENEJB-1602.
----------------------------------------
Resolution: Fixed
If it works, we can close ;-)
> Interceptors are not sorted correctly while intercept-ordering is used on override method name style
> ----------------------------------------------------------------------------------------------------
>
> Key: OPENEJB-1602
> URL: https://issues.apache.org/jira/browse/OPENEJB-1602
> Project: OpenEJB
> Issue Type: Bug
> Components: interceptors
> Affects Versions: 4.0
> Reporter: Ivan
> Assignee: Ivan
> Fix For: 4.0
>
>
> In current OpenEJB interceptor sorting algorithm, four levels are defined : PACKAGE, CLASS, OVERLOADED_METHOD, EXACT_METHOD. While from the spec side, it only configures three level : PACKAGE, CLASS, METHOD, And the OVERLOADED_METHOD is a solution to configure some methods with the same name at once. In the sample below, we will got a incorrect interceptor ordering :
> class MyBean {
> @Interceptors{{Interceptor1.class, Interceptor2.class}}
> public method1()
> }
> In the deployment plan, we have the configurations below :
> <interceptor-binding>
> <ejb-name>MyBean </ejb-name>
> <interceptor-order>
> <interceptor-class>org.apache.openejb.interceptor.Interceptor2</interceptor-class>
> <interceptor-class>org.apache.openejb.interceptor.Interceptor1</interceptor-class>
> </interceptor-order>
> <method>
> <method-name>method1</method-name>
> </method>
> </interceptor-binding>
> Per the description in the spec about interceptor-order, the final order should be interceptor2 -> interceptor1. while now the final order is interceptor1, interceptor2, interceptor2, interceptor1. The root cause for it is that we have an extra level.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENEJB-1602) Interceptors are not sorted
correctly while intercept-ordering is used on override method name style
Posted by "Ivan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENEJB-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052424#comment-13052424 ]
Ivan commented on OPENEJB-1602:
-------------------------------
Commit the changes to trunk at r1137906. thanks for the suggestion, David, it works very well.
> Interceptors are not sorted correctly while intercept-ordering is used on override method name style
> ----------------------------------------------------------------------------------------------------
>
> Key: OPENEJB-1602
> URL: https://issues.apache.org/jira/browse/OPENEJB-1602
> Project: OpenEJB
> Issue Type: Bug
> Components: interceptors
> Affects Versions: 4.0
> Reporter: Ivan
> Assignee: Ivan
> Fix For: 4.0
>
>
> In current OpenEJB interceptor sorting algorithm, four levels are defined : PACKAGE, CLASS, OVERLOADED_METHOD, EXACT_METHOD. While from the spec side, it only configures three level : PACKAGE, CLASS, METHOD, And the OVERLOADED_METHOD is a solution to configure some methods with the same name at once. In the sample below, we will got a incorrect interceptor ordering :
> class MyBean {
> @Interceptors{{Interceptor1.class, Interceptor2.class}}
> public method1()
> }
> In the deployment plan, we have the configurations below :
> <interceptor-binding>
> <ejb-name>MyBean </ejb-name>
> <interceptor-order>
> <interceptor-class>org.apache.openejb.interceptor.Interceptor2</interceptor-class>
> <interceptor-class>org.apache.openejb.interceptor.Interceptor1</interceptor-class>
> </interceptor-order>
> <method>
> <method-name>method1</method-name>
> </method>
> </interceptor-binding>
> Per the description in the spec about interceptor-order, the final order should be interceptor2 -> interceptor1. while now the final order is interceptor1, interceptor2, interceptor2, interceptor1. The root cause for it is that we have an extra level.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira