<div dir="ltr"><br><br><div class="gmail_quote">On Tue, Mar 17, 2015 at 4:50 AM Martin Kouba <<a href="mailto:mkouba@redhat.com">mkouba@redhat.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's ok to have the same default bean discovery mode in Java SE.<br>
However, I think there is no easy way to scan the classpath and "detect"<br>
bean archives without beans.xml, i.e. implicit bean archives without the<br>
descriptor.<br></blockquote><div><br></div><div>You should be able to read java.class.path to determine the possible archives. Then use the URL of the class itself to find which JAR it came from.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
That's the reason why bean archives without beans.xml are not supported<br>
in Weld SE.<br>
<br>
If anyone knows how to implement this properly, speak out.<br>
<br>
Martin<br>
<br>
Dne 17.3.2015 v 07:22 Jozef Hartinger napsal(a):<br>
><br>
> On 03/16/2015 05:45 PM, Antoine Sabot-Durand wrote:<br>
>><br>
>>> Le 16 mars 2015 à 11:02, Jozef Hartinger <<a href="mailto:jharting@redhat.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=jharting@redhat.com&cc=&bcc=&su=&body=','_blank');return false;">jharting@redhat.com</a><br>
>>> <mailto:<a href="mailto:jharting@redhat.com" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=jharting@redhat.com&cc=&bcc=&su=&body=','_blank');return false;">jharting@redhat.com</a>>> a écrit :<br>
>>><br>
>>> Btw was there any further discussion about the bean discovery mode in SE<br>
>>><br>
>><br>
>> For the time being we decided to have the same discovery mode in SE<br>
>> (default to Annotated). If someone has a good reason to change the<br>
>> default mode in SE and/or add a new discovery mode, I’d be glad to<br>
>> hear about it.<br>
> <a href="http://lists.jboss.org/pipermail/cdi-dev/2015-March/006334.html" target="_blank">http://lists.jboss.org/<u></u>pipermail/cdi-dev/2015-March/<u></u>006334.html</a><br>
>><br>
>><br>
>>> On 03/16/2015 10:45 AM, Jozef Hartinger wrote:<br>
>>>> The CDIProvider serves as a kind of SPI for CDI's static methods to<br>
>>>> be able to call into the implementation. I don't think reusing it<br>
>>>> also as a user-facing code is a good idea. What people suggesting to<br>
>>>> reuse CDIProvider had in mind, I think, was to reuse it as the SPI<br>
>>>> for talking to the CDI implementation instead. That way, the<br>
>>>> initialize() static method of CDIContainer/StartedCDI/<u></u>whatever we<br>
>>>> call it can use CDIProvider internally to actually start the container.<br>
>>>><br>
>>>> In addition, the current proposal does not make it possible to<br>
>>>> implement parallel container instances.<br>
>>>><br>
>>>> Jozef<br>
>>>><br>
>>>> On 03/15/2015 05:03 PM, John D. Ament wrote:<br>
>>>>> HI all,<br>
>>>>><br>
>>>>> Apologies for being a week late on getting this doc together. I<br>
>>>>> had some personal issues pop up after my leg came out of its cast<br>
>>>>> that consumed most of my week last week.<br>
>>>>><br>
>>>>> Anywho, I've updated the doc with a summary of what was discussed<br>
>>>>> with CDI SE bootstrap support. You can find that here:<br>
>>>>> <a href="https://docs.google.com/document/d/1LgsGT-AAlrF72Z5pW4xNQiVjUHGUME46ZmB-wwF35Yw/edit?usp=sharing" target="_blank">https://docs.google.com/<u></u>document/d/1LgsGT-<u></u>AAlrF72Z5pW4xNQiVjUHGUME46ZmB-<u></u>wwF35Yw/edit?usp=sharing</a><br>
>>>>><br>
>>>>> There are two minor changes that I made from where we last<br>
>>>>> discussed, as when I was putting together code I found some gaps<br>
>>>>> and figured it best to fix them here than later.<br>
>>>>><br>
>>>>> 1. CDIProvider does not implement AutoCloseable. Since CDI class<br>
>>>>> maintains a reference to the provider, implementing AutoCloseable<br>
>>>>> was not adding anything.<br>
>>>>><br>
>>>>> 2. I added a method boolean isInitialized() so that the caller can<br>
>>>>> know if they need to start the container (or if it's already running).<br>
>>>>><br>
>>>>> Locally, I've also modified the CDI.current() method to use<br>
>>>>> getCDIProvider() instead of internally finding the provider since<br>
>>>>> we now have a getter.<br>
>>>>><br>
>>>>> One thing I'd like to get feedback on is if calling<br>
>>>>> initialize/shutdown in a container should throw<br>
>>>>> IllegalStateException, or probably better to throw<br>
>>>>> UnsupportedOperationException when called in EE containers.<br>
>>>>><br>
>>>>> Let me know your thoughts.<br>
>>>>><br>
>>>>> John<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> ______________________________<u></u>_________________<br>
>>>>> cdi-dev mailing list<br>
>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cdi-dev@lists.jboss.org&cc=&bcc=&su=&body=','_blank');return false;">cdi-dev@lists.jboss.org</a><br>
>>>>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/cdi-dev</a><br>
>>>>><br>
>>>>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/<u></u>licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> ______________________________<u></u>_________________<br>
>>>> cdi-dev mailing list<br>
>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cdi-dev@lists.jboss.org&cc=&bcc=&su=&body=','_blank');return false;">cdi-dev@lists.jboss.org</a><br>
>>>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/cdi-dev</a><br>
>>>><br>
>>>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/<u></u>licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
>>><br>
>>> ______________________________<u></u>_________________<br>
>>> cdi-dev mailing list<br>
>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cdi-dev@lists.jboss.org&cc=&bcc=&su=&body=','_blank');return false;">cdi-dev@lists.jboss.org</a> <mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cdi-dev@lists.jboss.org&cc=&bcc=&su=&body=','_blank');return false;">cdi-dev@lists.jboss.<u></u>org</a>><br>
>>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/cdi-dev</a><br>
>>><br>
>>> Note that for all code provided on this list, the provider licenses<br>
>>> the code under the Apache License, Version 2<br>
>>> (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/<u></u>licenses/LICENSE-2.0.html</a>). For all other<br>
>>> ideas provided on this list, the provider waives all patent and other<br>
>>> intellectual property rights inherent in such information.<br>
>><br>
><br>
><br>
><br>
> ______________________________<u></u>_________________<br>
> cdi-dev mailing list<br>
> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cdi-dev@lists.jboss.org&cc=&bcc=&su=&body=','_blank');return false;">cdi-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/cdi-dev</a><br>
><br>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/<u></u>licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
><br>
______________________________<u></u>_________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open('https://mail.google.com/mail/?view=cm&tf=1&to=cdi-dev@lists.jboss.org&cc=&bcc=&su=&body=','_blank');return false;">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/<u></u>licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
</blockquote></div></div>