You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Eric Covener <co...@apache.org> on 2009/10/22 23:13:14 UTC

@AroundInvoke -- JCDI vs EJB3 and return type Object?

Interceptor methods with @AroundInvoke in EJB3 requires a return type
of Object, which is enforced by
WebBeansUtil.java::checkAroundInvokeAnnotationCriterias().    In EJB3,
Interceptors return InvocationContext.proceed() to their caller.

However it seems that @AroundInvoke in JCDI is documented somewhat
differently -- in the JCDI spec (1.3.6) the example has a void return
type and just calls InvocationContext.proceed().

Should the JCDI spec example look just like EJB3, or is this an
OWB-specific restriction?

-- 
Eric Covener
covener@gmail.com

Re: @AroundInvoke -- JCDI vs EJB3 and return type Object?

Posted by Mark Struberg <st...@yahoo.de>.
Hi!

Haven't looked at it, but if you think it's a bug in the spec, then drop Gavin or the weld-dev list a mail.

LieGrue,
strub



----- Original Message ----
> From: Sven Linstaedt <sv...@googlemail.com>
> To: openwebbeans-dev@incubator.apache.org
> Sent: Fri, October 23, 2009 5:53:28 PM
> Subject: Re: @AroundInvoke -- JCDI vs EJB3 and return type Object?
> 
> At a first glance I would consider this a bug in the example. I can not
> imagine Gavin introduced some kind of "special interceptors for void
> returning methods". This would rather be a use case for decorators.
> I will forward your question to the jboss list, if you don't mind.
> Besides... thanks for for the review.
> 
> br, Sven
> 
> 
> 2009/10/22 Eric Covener 
> 
> > Interceptor methods with @AroundInvoke in EJB3 requires a return type
> > of Object, which is enforced by
> > WebBeansUtil.java::checkAroundInvokeAnnotationCriterias().    In EJB3,
> > Interceptors return InvocationContext.proceed() to their caller.
> >
> > However it seems that @AroundInvoke in JCDI is documented somewhat
> > differently -- in the JCDI spec (1.3.6) the example has a void return
> > type and just calls InvocationContext.proceed().
> >
> > Should the JCDI spec example look just like EJB3, or is this an
> > OWB-specific restriction?
> >
> > --
> > Eric Covener
> > covener@gmail.com
> >



      

Re: @AroundInvoke -- JCDI vs EJB3 and return type Object?

Posted by Sven Linstaedt <sv...@googlemail.com>.
At a first glance I would consider this a bug in the example. I can not
imagine Gavin introduced some kind of "special interceptors for void
returning methods". This would rather be a use case for decorators.
I will forward your question to the jboss list, if you don't mind.
Besides... thanks for for the review.

br, Sven


2009/10/22 Eric Covener <co...@apache.org>

> Interceptor methods with @AroundInvoke in EJB3 requires a return type
> of Object, which is enforced by
> WebBeansUtil.java::checkAroundInvokeAnnotationCriterias().    In EJB3,
> Interceptors return InvocationContext.proceed() to their caller.
>
> However it seems that @AroundInvoke in JCDI is documented somewhat
> differently -- in the JCDI spec (1.3.6) the example has a void return
> type and just calls InvocationContext.proceed().
>
> Should the JCDI spec example look just like EJB3, or is this an
> OWB-specific restriction?
>
> --
> Eric Covener
> covener@gmail.com
>