[weld-dev] Flat Deployment mode & beans.xml

Matej Novotny manovotn at redhat.com
Mon Jan 15 02:16:25 EST 2018


Actually, now that I think of it I was wrong.
You may have a set of JARs in your deployment and you don't want to pick up beans from all JARs (it might even lead to ambiguous dep for example).
Therefore, beans.xml, even empty one, would be required to mark an archive which is to be considered a bean archive.

I also found this test which can be easily fiddled with to verify what I said above - https://github.com/weld/core/blob/master/environments/se/tests/src/test/java/org/jboss/weld/environment/se/test/discovery/isolation/IsolationDisabledTest.java
E.g. if you change `bda1` to be a JavaArchive (no beans.xml added), it will fail with unsatisfied dep.

Matej

----- Original Message -----
> From: "Matej Novotny" <manovotn at redhat.com>
> To: "John D. Ament" <john.d.ament at gmail.com>
> Cc: "Weld" <weld-dev at lists.jboss.org>
> Sent: Monday, January 15, 2018 8:04:15 AM
> Subject: Re: [weld-dev] Flat Deployment mode & beans.xml
> 
> Hi John,
> 
> what you say makes sense, there shouldn't be need for multiple beans.xml.
> Does it give you any errors?
> 
> Matej
> 
> ----- Original Message -----
> > From: "John D. Ament" <john.d.ament at gmail.com>
> > To: "Weld" <weld-dev at lists.jboss.org>
> > Sent: Saturday, January 13, 2018 4:17:35 PM
> > Subject: [weld-dev] Flat Deployment mode & beans.xml
> > 
> > Hi,
> > 
> > If I'm using Weld SE in a flat deployment mode, is a beans.xml required
> > still
> > in all JARs? I would assume that with the beans.xml's being merged, any JAR
> > that didn't have a beans.xml would inherit the "merged" one.
> > 
> > John
> > 
> > _______________________________________________
> > weld-dev mailing list
> > weld-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/weld-dev
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
> 


More information about the weld-dev mailing list