On Tue, Sep 6, 2011 at 18:26, Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Regarding <a href="https://issues.jboss.org/browse/CDI-14" target="_blank">https://issues.jboss.org/browse/CDI-14</a>, I&#39;ve created this patch <a href="https://github.com/jboss/cdi/pull/43" target="_blank">https://github.com/jboss/cdi/pull/43</a>.<br>


<br>
This also touches on CDI-26, which is about providing an embedded mode (API for starting CDI) - it covers about 50% of that issue. It doesn&#39;t provide a bootstrap API, but it does provide a programmatic API to access the container:<br>


<br>
CDI.current().getBeanManager();<br>
<br>
CDI.current().select(MyBean.class).select(new MyQualifierLiteral()).doSomething();<br>
<br>
(CDI implements Instance)<br></blockquote><div><br></div><div>I like the approach. The name of the current() method doesn&#39;t feel quite right. What about:</div><div><br></div><div>CDI.getRuntime()</div><div><br></div>

<div>(this was also suggested by Laird Neslon).</div><div><br></div><div>-Dan</div><div> </div></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br>

<br><div><a href="http://www.google.com/profiles/dan.j.allen#about" target="_blank">http://www.google.com/profiles/dan.j.allen#about</a><br><a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br>

</div><br>