<div class="gmail_quote">On Wed, Nov 10, 2010 at 3:52 PM, Clint Popetz <span dir="ltr"><<a href="mailto:cpopetz@gmail.com">cpopetz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If you go that route, you lose the ability to inject instances of<br>
third party classes without defining a @Produces method. That may be<br>
preferable to the existing problems caused by default @Dependents, but<br>
I wanted to point it out for clarity.<br></blockquote><div><br></div><div>Actually, there is one other approach to registering a class from a non-bean archive (no beans.xml), which is used in Weld Extensions. You can add the annotated types explicitly in an extension:</div>
<div><br></div><div> void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager beanManager)</div><div> {</div><div> event.addAnnotatedType(beanManager.createAnnotatedType(BeanIAm.class));</div><div>
}</div><div><br></div><div>-Dan</div><div><br></div></div>-- <br>Dan Allen<br>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><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><a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>