jsr342-experts@javaee-spec.java.net

[jsr342-experts] Re: Make all EE components Managed Bean

From: Reza Rahman <reza_rahman_at_lycos.com>
Date: Thu, 23 Jun 2011 12:22:32 -0400

Antonio,

That's already on the to-do list for Java EE 7...

Cheers,
Reza


On 6/23/2011 12:10 PM, Antonio Goncalves wrote:
> Hi all,
>
> I came across a mistake recently. I was working on a project and wrote
> a Logging interceptor to add some traces (so I could easily follow
> what was happening). I then wrote an InterceptorBinding (the good old
> @Loggable) and started to intercept my EJBs... and then some CDI
> beans... and then some JAX-RS classes... and then, without even
> thinking of it, I've added the @Loggable on the doGet method of a
> Servlet. Didn't work for the servlet... because a servlet is not a
> Managed Bean. I didn't try with JAX-WS SOAP web services but I hope
> interception works
>
> If a ManagedBean is only about injection, life cycle and interceptors,
> why not make all the components of the platform as ManagedBeans ? The
> spec is not clear about that. I'm not sure Servlets 3.0 are not
> managed bean, maybe just because it didn't had time to align with
> ManagedBean... or maybe there a technical reason.
>
> Any thoughts ?
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <http://www.antoniogoncalves.org> | Twitter
> <http://twitter.com/agoncal> | Blog
> <http://feeds.feedburner.com/AntonioGoncalves> | LinkedIn
> <http://www.linkedin.com/in/agoncal> | Paris JUG <http://www.parisjug.org>
> ------------------------------------------------------------------------
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 10.0.1382 / Virus Database: 1513/3721 - Release Date: 06/23/11
>