<div dir="ltr">Jozef,<div><br></div><div>Most of what you see there is taken from the original doc, since everyone seemed to be in agreement.  I think the map is just a safeguard in case of additional boot options available in some implementations (e.g. I think OWB/OpenEJB have some options.. currently OpenEJB supports an embedded CDI boot mode).</div><div><br></div><div>We spoke a few times about BeanManager vs CDI.  BeanManager was preferable since there&#39;s no easy way to get the the instance, CDI is easier to get and more aligned with how you would get it.  Usually people expect the BeanManager to be injected or available via JNDI, neither would be the case here.</div><div><br></div><div>Yes, this is the container start API.  Sounds like you have some good ideas for things like XML configuration or programmatic configuration, both of which are being tracked under separate tickets.  One idea might be for an optional param in the map to control packages to scan/ignore, in that map.</div><div><br></div><div>We didn&#39;t want to over load the CDI interface.  It already does a lot.  This is really SPI code, CDI even though it&#39;s in the spi package is used in a lot of application code.</div><div><br></div><div>John<br><br><div class="gmail_quote">On Wed Feb 11 2015 at 4:21:50 AM Jozef Hartinger &lt;<a href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi John, some thoughts:<br>
    <br>
    - instead of using BeanManager it makes more sense to me to return a
    CDI instance, which is a more user-friendly API (and it also exposes
    access to BeanManager)<br>
    - is there a usecase for arbitrary keys of the &quot;params&quot; map or is
    Map&lt;String, ?&gt; sufficient?<br>
    - if we could move the shutdown() method from
    
    CDIContainer to the actual container handle that we obtain from
    initialize(), that would look more object-oriented<br>
    - what exactly is initialize() supposed to do? Is it supposed to
    start scanning the entire classpath for CDI beans? That could be a
    problem especially with spring-boot-like fat jars. I think we need
    an API to tell the container which classes / packages to consider.
    Something like Guice&#39;s binding API perhaps?<br>
    <br>
    - the proposal makes me wonder whether retrofitting this
    functionality to the CDI class wouldn&#39;t be a better option. It could
    look like:<br>
    <br>
    CDI container = CDI.initialize();<br>
    container.select(Foo.class).get();<br>
    container.shutdown();<br>
    <br>
    compare it to:<br>
    <br>
    
    CDIContainer container = CDIContainerLoader.
    
    getCDIContainer();<br>
    BeanManager manager = container.initialize();<br>
    manager.getBeans(...);<br>
    container.shutdown(manager);</div><div text="#000000" bgcolor="#FFFFFF"><br>
    <br>
    <div>On 02/10/2015 06:58 PM, John D. Ament
      wrote:<br>
    </div>
    </div><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite">
      <div dir="ltr">All,
        <div><br>
        </div>
        <div>I have the updated API here, and wanted to solicit any
          final feedback before updating the google doc and spec pages.</div>
        <div><br>
        </div>
        <div><a href="https://github.com/johnament/cdi/commit/2c362161e18dd521f8e83c27151ddad467a1c01c" target="_blank">https://github.com/johnament/cdi/commit/2c362161e18dd521f8e83c27151ddad467a1c01c</a><br>
        </div>
        <div><br>
        </div>
        <div>Let me know your thoughts.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div><br>
        </div>
        <div>John</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </blockquote></div><div text="#000000" bgcolor="#FFFFFF"><blockquote type="cite"><pre>_______________________________________________
cdi-dev mailing list
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank" onclick="window.open(&#39;https://mail.google.com/mail/?view=cm&amp;tf=1&amp;to=cdi-dev@lists.jboss.org&amp;cc=&amp;bcc=&amp;su=&amp;body=&#39;,&#39;_blank&#39;);return false;">cdi-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>

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/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.</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div></div></div>