[cdi-dev] [JBoss JIRA] (CDI-346) Unclear relation between bean discovery and @WithAnnotations

Pete Muir pmuir at redhat.com
Wed Mar 13 08:04:13 EDT 2013


Yes, all session beans are automatically added in the PFD.

On 12 Mar 2013, at 20:49, Romain Manni-Bucau <rmannibucau at gmail.com> wrote:

> Hi
> 
> just as a little feedback i think ejbs could be added respecting EE hierarchy (classloader) because it really eases integratino with legacy modules (without beans.xml)
> 
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 
> 2013/3/12 Mark Struberg <struberg at yahoo.de>
> 
> 
> Hi Pete!
> 
> I was drafting on a general 'implicit bean archive' mail for a few days, but I got side tracked and it is/was not yet ready.
> 
> I feel a bit uncomfortable with the introduction of 'implicit bean archives' in general. Or at least I don't yet have enough understanding to think it's well enough defined.
> I'm not sure where the benefit over the clear beans.xml yes/no behaviour we had in CDI-1.0 is, but anyway. Let's put this aside and see how it might work
> 
> If I understood it correctly, the intended behaviour is as following:
> 
> * a JAR without any beans.xml but with beans with a CDI scope. Those classes (only the ones with cdi scopes) get scanned.
> * only those cdi-scoped classes get fired to ProcessAnnotatedType, right?
> * the Extension has no way to distinguish whether a class did come from an implicit or explicit bean archive.
> 
> * What happens if the Extension removes the scope annotation via PAT? Will it become @Dependent or not?
> 
> * what about EJBs in such a jar without a beans.xml? Is this also a 'bean defining annotation'? Do they lead to firing a PAT for them? Can an Extension rely on it? While thinking about this: is this even defined in CDI-1.0? Section 12.1 + 11.5.5 define that a PAT must get fired for all jars with beans.xml, but is it forbidden in cdi-1.0 to fire a PAT for e.g EJBs in jars without any beans.xml in them?
> The 'implicit but only a little' behaviour just blurs things imo. My gut feeling is that we will see many corner cases where this will create problems / need for clarification.
>  
> 
> LieGrue,
> strub
> 
> 
> >________________________________
> > From: Pete Muir <pmuir at bleepbleep.org.uk>
> >To: CDI-Dev <cdi-dev at lists.jboss.org>; Mark Struberg <struberg at yahoo.de>
> >Sent: Tuesday, March 12, 2013 11:25 AM
> >Subject: Fwd: [JBoss JIRA] (CDI-346) Unclear relation between bean discovery and @WithAnnotations
> >
> >
> >The words I used were "explicit bean archive" and "implicit bean archive" - explicit because it has a beans.xml so is explicitly a bean archive, and implicit as the inverse of this.
> >
> >
> >If you've got other suggestions, I would love to hear them, but as usual, this is the best *I* was able to come up with, and so complaining without providing alternative ideas won't actually result in any improvement ;-)
> >
> >
> >Begin forwarded message:
> >
> >From: "Mark Struberg (JIRA)" <jira-events at lists.jboss.org>
> >>
> >>Subject: [JBoss JIRA] (CDI-346) Unclear relation between bean discovery and @WithAnnotations
> >>
> >>Date: 11 March 2013 08:08:41 GMT
> >>
> >>To: pmuir at bleepbleep.org.uk
> >>
> >>
> >>
> >>Mark Struberg commented on  CDI-346
> >>Unclear relation between bean discovery and @WithAnnotations  
> >> Agree. Plus it's also not possible in an Extension to know from which 'kind' of bean archive the current PAT did come from. We e.g. cannot make this depending on any previously fired ProcessModule event as CDI containers might run the discovery in parallel threads.
> >>If some Extension gets a PAT with a class without any scope, should it handle this class? Well, that depends whether this BDA is an 'automatic' or a 'non-pickup' (whatever non-intuitive wording got chosen finally) bean archive.    
> >>This message is automatically generated by JIRA.
> >>If you think it was sent incorrectly, please contact your JIRA administrators
> >>For more information on JIRA, see: http://www.atlassian.com/software/jira
> >
> >
> >
> 
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> 
> _______________________________________________
> 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