<div dir="ltr">OSGi runtime integator uses this. Romain, as explained by Martin, it is not designed by lib usage. Can you elaborate your use case here so that we can discuss further?<div><br></div><div>Thanks</div><div>Emily </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 29, 2018 at 4:24 PM, Martin Kouba (JIRA) <span dir="ltr">&lt;<a href="mailto:issues@jboss.org" target="_blank">issues@jboss.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
    [ <a href="https://issues.jboss.org/browse/CDI-726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13583731#comment-13583731" rel="noreferrer" target="_blank">https://issues.jboss.org/<wbr>browse/CDI-726?page=com.<wbr>atlassian.jira.plugin.system.<wbr>issuetabpanels:comment-<wbr>tabpanel&amp;focusedCommentId=<wbr>13583731#comment-13583731</a> ] <br>
<span class=""><br>
Martin Kouba commented on CDI-726:<br>
------------------------------<wbr>----<br>
<br>
</span>Hm, in CDI 1.2 it was only possible to set the provider once and I remember there was some legal use case for this method (OSGi or something like that). You&#39;re right that in CDI 2.0 anyone can set it anytime. The logic seems to be modified in this commit: <a href="https://github.com/cdi-spec/cdi/commit/14cd36abb4d039212cf21521a46755b15f4e0a1c#diff-03e83766e93415c9ba16a9dfb42a5ac5" rel="noreferrer" target="_blank">https://github.com/cdi-spec/<wbr>cdi/commit/<wbr>14cd36abb4d039212cf21521a46755<wbr>b15f4e0a1c#diff-<wbr>03e83766e93415c9ba16a9dfb42a5a<wbr>c5</a>. [~antoinesabot-durand] Do you remember the details?<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; Deprecate before dropping CDI.setCDIProvider<br>
&gt; ------------------------------<wbr>--------------<br>
&gt;<br>
&gt;                 Key: CDI-726<br>
&gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-726" rel="noreferrer" target="_blank">https://issues.jboss.org/<wbr>browse/CDI-726</a><br>
&gt;             Project: CDI Specification Issues<br>
&gt;          Issue Type: Feature Request<br>
&gt;          Components: Java SE Integration<br>
&gt;    Affects Versions: 2.0 .Final<br>
&gt;            Reporter: Romain Manni-Bucau<br>
&gt;            Priority: Blocker<br>
&gt;<br>
&gt; CDI.setCDIProvider allows to switch the cdi provider at *any* time by *anyone*. This lead to issues integrating multiple libraries doing it + is not a real user facing API, it is actually a server internal.<br>
&gt; Proposal is to deprecate the method, remove its implementation (always throw an IllegalStateException or just do a noop) and finally drop the method after one or two releases since it can&#39;t really be used except for very simple apps.<br>
<br>
<br>
<br>
--<br>
This message was sent by Atlassian JIRA<br>
(v7.5.0#75005)<br>
______________________________<wbr>_________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>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" rel="noreferrer" target="_blank">http://www.apache.org/<wbr>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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Thanks<br>Emily<br>=================<br>Emily Jiang<br><a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br></div>
</div>