You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jacek Laskowski (JIRA)" <ji...@apache.org> on 2007/12/28 20:58:43 UTC

[jira] Commented: (OPENEJB-583) Problems excluding default interceptor

    [ https://issues.apache.org/jira/browse/OPENEJB-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12554831 ] 

Jacek Laskowski commented on OPENEJB-583:
-----------------------------------------

I could reproduce the last part of the issue when a bean class has @ExcludeDefaultInterceptors whereas its business method has @ExcludeClassInterceptors. When such a bean's deployed, ProcessAnnotatedBeans adds new interceptor and interceptorbindings sections in ejb-jar.xml - one for @ExcludeDefaultInterceptors and another for @ExcludeClassInterceptors. In InterceptorBindingBuilder.processBindings they're both considered as Level.CLASS and when the first - @ExcludeClassInterceptors - is processed the type's Type.ADDITION_OR_LOWER_EXCLUSION and since info.excludeClassInterceptors is true, Level.CLASS's added to excludes. The second InterceptorBindingInfo for @ExcludeDefaultInterceptors is "filtered out" at "if (excludes.contains(level)) continue;" and never gets its chance to disable package-level interceptors for a given method.

DMB's added in the openejb-dev mailing list:

FYI, this test case is going to be invaluable to you: org.apache.openejb.core.stateless.StatelessInterceptorTest

I wrote that up before we had the corresponding itests.  It was invaluable to me when writing the original binding processing code. It doesn't have the situation described in OPENEJB-583, but it could
be added so you'd have a small isolated unit test to walk through with a debugger.

> Problems excluding default interceptor
> --------------------------------------
>
>                 Key: OPENEJB-583
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-583
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: interceptors
>    Affects Versions: 3.0-beta-1
>            Reporter: Prasad Kashyap
>            Assignee: Jacek Laskowski
>             Fix For: 3.0-beta-2
>
>
> http://www.nabble.com/forum/ViewPost.jtp?post=10271166&framed=y&skin=2756
> This problem exists uniformly for both annotation specified and DD specificied interceptors
> If you try to exclude a class from default interceptors, the lifecycle events are excluded but some of the business methods are not.
> When a @ExcludeDefault is specified at the class level, default interceptors are excluded only for those business methods that do not have a @ExcludeClass specified on them. 
> If a business method has a @ExcludeClass specified on it, it ignores the @ExcludeDefault specified for the whole class (either by annotation or xml).

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