[cdi-dev] Resolving CDI-129

Mark Struberg struberg at yahoo.de
Mon Oct 22 09:33:47 EDT 2012


Hi Pete!

I'm perfectly fine with the vote. 

I'm also fine with both interpretations of @ApplicationScoped at the end. I actually don't care too much as it would be easy to just provide an own Context for javax.faces.bean ApplicationScoped.


What I DO care about are the visibility rules. Once we deal with scopes broader than 1-per-war (or more generally speaking a scope which is shared over multiple classloaders which don't see each other) and we interpret 5.1 in the way Jozef does than

* any bean defined in a shared lib will not be able to see beans in any webapp. And this even regardless of the scope, even @RequestScoped and @SessionScoped beans defined in an WAR would not be visible. 

* no class defined in a WAR file would get *any* CDI event originating in a class which is in a shared lib. 

* if you write @Inject User user; you will end up with a different contextual instance than the same code @Inject User user; in a class which is in a shared lib jar.


* Extension Rules are ambiguous for anything > 1-per-war

* BeanManager#getBeans(String ), #getBeans(Type, Qualifiers), #resolve(), etc must get fixed

* Alternatives, Decorators, Interceptors and Specializes in WARs would not work for any classes defined in a shared lib.


If people can live with that, then so be it. Currently it's not possible to write portable applications for EAR scenarios it seems so I really like to address that in CDI-1.1.


By using the TCCL as OWB does currently  (and even Weld/JBossAS as far as my tests showed) we could avoid those shortcoming at least for all @NormalScoped beans.


LieGrue,
strub


>________________________________
> From: Pete Muir <pmuir at redhat.com>
>To: cdi-dev <cdi-dev at lists.jboss.org> 
>Sent: Monday, October 22, 2012 3:08 PM
>Subject: [cdi-dev] Resolving CDI-129
> 
>All,
>
>I suspect we aren't going to come to a consensus on CDI-129, which revolves around the question of whether @ApplicationScoped is per-WAR or per-EAR.
>
>Therefore, I want to understand how the CDI community would like us to resolve the issue. We've already seen that an an open poll of the community has been indecisive (I'm unwilling to take such a small margin on this, as it's hard to know how representative a sample we took!). This, I think, leaves us with two options:
>
>1) We take a vote in the EG, with one vote per company/organisation and one vote per individual member. Currently this is:
>
>Organisations
>-------------------
>
>* Red Hat (Pete Muir)
>* IBM (Joe Bergmark)
>* Morocco JUG (Faissal Boutaounte) #
>* Serli (Jerome Petit)
>* Oracle (JJ Snyder)
>
>Individuals
>---------------
>
>* Norman Erck #
>* Rick Hightower
>* Werner Keil
>* Antoine Sabot-Durand
>* Mark Struberg 
>* Daniel Sachse #
>
>Note that George Gastaldi now works for Red Hat, so I've removed him from the voting list. I've also substituted Siva with JJ for Oracle.
>
>If I have marked your name with a #, then it means I have not heard from you recently on CDI (either in person or on the EG), and I would appreciate a quick ping back to confirm you are active. If
>
>(a) we take a vote, AND
>(b) you have a # next to your name, AND
>(c) I have not heard from you by the end of the vote period
>
>then I will mark you as MIA, and your vote will be ignored when we tally votes. The simple way to address this is to send me a quick ping back, so that I hassle you when it comes to voting time :-)
>
>2) We leave the issue as unresolved for CDI 1.1
>
>If you have a preference for option (1) or option (2), then please say so!
>
>Pete
>_______________________________________________
>cdi-dev mailing list
>cdi-dev at lists.jboss.org
>https://lists.jboss.org/mailman/listinfo/cdi-dev
>
>
>


More information about the cdi-dev mailing list