<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Can you add your comments to the JIRA issue, that is the best way to track such design discussions.<div><br><div><div>On 26 Apr 2011, at 00:07, Rick Hightower wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">We need a general purpose way of finding a BeanManager.<div>+1 for me.</div><div><br></div><div>This way should include JNDI lookup to a fallback BeanManagerLocator that uses a ServiceLoader</div><div>+1 for me.</div><div>
<br></div><div>I think the behavior should look like this:</div><div><br></div><div><ul><li>Lookup BeanManager in JNDI</li><li>If not found, try to load&nbsp;BeanManagerLocator from system property.</li><li>If not found, try to load BeanManagerLocator from ServiceLoader.</li>
<li>If more than one&nbsp;BeanManagerLocator found, sort by priority or die if there is more than one. (not sure about the sort, I think it should die, but can be convinced otherwise).</li><li>Once the BeanManagerLocator is found, use it to return a BeanManager</li>
</ul></div><div><br></div><div>In addition,</div><div><br></div><div>I think we need a simplified interface for&nbsp;BeanManager.&nbsp;</div><div><br></div><div><a href="https://github.com/CDISource/cdisource/blob/master/beancontainer/api/src/main/java/org/cdisource/beancontainer/BeanContainer.java">https://github.com/CDISource/cdisource/blob/master/beancontainer/api/src/main/java/org/cdisource/beancontainer/BeanContainer.java</a></div>
<div><br></div><div>This could just be a utility class, but it should be included with CDI 1.1. I think the &nbsp;BeanManager interface is too low level.</div></blockquote><br></div><div>This will need a new JIRA issue. I would suggest emphasising the problem when you create the issue rather than your solution (i.e. the BM interface is too low level NOT that we need a utility class as the first promotes discussion and ideas, the second will force people to consider a certain approach).</div><br></div></body></html>