[
https://issues.apache.org/jira/browse/OPENEJB-584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Blevins closed OPENEJB-584.
---------------------------------
Resolution: Invalid
Fix Version/s: (was: 3.0-beta-2)
Assignee: David Blevins
I've verified that a binding in xml such as this:
<interceptor-binding>
<ejb-name>TargetBean</ejb-name>
<interceptor-class>MyEchoMethodInterceptorViaDD</interceptor-class>
<method>
<method-name>echo</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
</interceptor-binding>
and an annotated method such as:
@Interceptors({MyEchoMethodInterceptorViaAnn.class})
public String echo(String s){...}
That the MyEchoMethodInterceptorViaAnn will get invoked before the
MyEchoMethodInterceptorViaDD interceptor.
However, if you change your interceptor-binding declaration to be less specific
by removing the method-params it becomes less specific binding applying to all
overloaded "echo" methods. Any more specific bindings (those naming the method
exactly, which is what annotated bindings turn into) will be applied over the
top of the less specific binding.
> Method-level interceptors declared via annotations executed before
> method-level annotations declared via xml
> ------------------------------------------------------------------------------------------------------------
>
> Key: OPENEJB-584
> URL: https://issues.apache.org/jira/browse/OPENEJB-584
> Project: OpenEJB
> Issue Type: Bug
> Components: interceptors
> Affects Versions: 3.0-beta-1
> Reporter: Prasad Kashyap
> Assignee: David Blevins
>
> http://www.nabble.com/forum/ViewPost.jtp?post=9639756&framed=y&skin=2756
> Take 2 method-level interceptors; 1 defined using annotation and 1 specified
> in the DD.
> I am able to verify that the binding from the annotation is added to a list
> (in the code) BEFORE the binding from the DD.
> Yet, the interceptor from the annotation gets invoked AFTER the interceptor
> from the DD !
> Section 12.8.2 of the spec says, "When the deployment descriptor is used to
> augment the interceptors specified in annotations, the interceptor methods
> specified in the deployment descriptor will be invoked after those specified
> in annotations"
> NOTE: The ordering works fine for class level interceptors.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.