[javaee-spec users] [jsr342-experts] Re: Re: managed beans, injection, and interceptors

From: Antonio Goncalves <>
Date: Thu, 6 Dec 2012 19:43:30 +0100

I'm forwarding an email from Marek to the list. Thanks Marek for your

But I'm still a bit concern about the term "NameBinding". We already have
an InterceptorBinding in CDI. Wouldn't it be good to use
CDI InterceptorBinding ? I know that would make JAX-RS "dependent" on CDI.
If it's not possible, what about calling yours the same name but in a
different package ( ?


On Thu, Dec 6, 2012 at 2:30 PM, Marek Potociar <>wrote:

> Hi Antonio,
> I wish I could reply to the Java EE experts list, but I most likely
> cannot... Feel free to forward.
> JAX-RS has *entity provider interceptors* (i.e. facility intercepting
> serialization and deserialization of HTTP message payloads - read: "very
> JAX-RS specific stuff").
> CDI has *method invocation interceptors* (i.e. facility intercepting Java
> method invocations on CDI beans).
> The only common thing for those two concepts is that they are both based
> on the "Chain of Interceptors" design pattern.
> As for the name, IMO both are interceptors (the name is derived from the
> design pattern). It may be confusing a bit initially, but I guess that
> thats the price we have to pay for assigning generic terms to specific
> concepts in Java EE. This is not the first time I'm hearing this feedback
> and we tried to come up with different names (e.g. handlers) but there's
> always seems to be another concept already in Java EE that took ownership
> of an otherwise generic name (e.g. with handlers it's a conflict with
> JAX-WS). At least in JAX-RS we do not call these components just
> "interceptors" we call them "entity provider interceptors" - which is what
> they are.
> I hope the above outlines the differences and sheds some light on the
> history behind of naming issues.

Antonio Goncalves
Software architect and Java Champion
Web site <> |
LinkedIn <> | Paris
JUG<> |
Devoxx France <>