Slight correction.

The interceptor chaining order should be

1. classInterceptor()
2. profile()                 <-- method-level
3. inBeanInterceptor()

No.2 (method-level) in the chain is missing.

Cheers
Prasad

On 3/16/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:
I'm still seeing issues with @ExcludeClassInterceptors.

I'm also seeing issues with method-level interception

https://issues.apache.org/jira/browse/OPENEJB-203#action_12481472

BasicStatelessInterceptor-v2.patch:

Patch has a bean BasicStatelessInterceptedBean.java with 1
inBeanInterceptor and 2 interceptor classes.

1 interceptor class (ClassInterceptor) applies to the whole bean while
the other (ProfileInterceptor) applies to just 1 business method (
reverse() )

Bean also has a getContextData() method which has
@ExcludesClassInterceptors annotation.

First, StatelessInterceptorTests.test01_methodProdile() The
expectation is to see the following interception chain-
1. classInterceptor()
3. inBeanInterceptor()
3. profile()

No.3 (method-level) in the chain is missing.

Next, in the StatelessInterceptorTests.test01_excludesClassInterceptor(),
the expectation is NOT to see the classInterceptor in the chain. But
that is seen too.

Cheers
Prasad



On 3/15/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:
> Ah ! OK.
>
> Wonder if this should have been called out explicitly in the spec.
>
> Thanx for the clarification, David.
>
> Cheers
> Prasad
>
> On 3/15/07, David Blevins <[EMAIL PROTECTED]> wrote:
> >
> > On Mar 15, 2007, at 12:22 PM, Prasad Kashyap wrote:
> >
> > > This ? http://rifers.org/paste/show/3951
> >
> > Oh, ok!  I meant the "other" bean class... yea that's the ticket! :-
> > P   Ok, so maybe I need some glasses. :)
> >
> > The funny thing is I was thinking "Where is the interceptor stack
> > declared, should be in the bean class... I'll know more if I can see
> > that"
> >
> > Anyway, now I realize the @AroundInvoke is *on* the bean class, which
> > is fine, but technically you don't have any interceptors to exclude.
> > The bean itself doesn't count as an interceptor and can't exclude
> > itself via @Exclude(Class|Default)Interceptors or add itself via
> > @Interceptors.
> >
> > If you throw the @AroundInvoke in another class (even an inner class
> > of the bean) and tack it onto the bean with an @Interceptors
> > ({MyInterceptor.class}) then it can be excluded.
> >
> > -David
> >
> > >
> > > Cheers
> > > Prasad
> > >
> > > On 3/15/07, David Blevins <[EMAIL PROTECTED]> wrote:
> > >>
> > >> On Mar 15, 2007, at 11:30 AM, Prasad Kashyap wrote:
> > >>
> > >> > This is my bean class.  http://rifers.org/paste/show/3951
> > >> > getContextData() is annotated with the @ExcludeClassInterceptors
> > >> tag.
> > >> >
> > >> > This is my itest file http://rifers.org/paste/show/3953
> > >> > test02_excludeClassInterceptors() fails.
> > >>
> > >> Hmm...  Can you post the bean class too?
> > >>
> > >> -David
> > >>
> > >> >
> > >> > Cheers
> > >> > Prasad
> > >> >
> > >>
> > >>
> > >
> >
> >
>

Reply via email to