Yes, you can either do it via an Extension or much easier via a @Produces method ;)
In any case, it wont work without adding code or configuration! LieGrue, strub --- On Wed, 11/10/10, Dan Allen <[email protected]> wrote: From: Dan Allen <[email protected]> Subject: Re: [weld-dev] A significantly negative article on Weld To: "Clint Popetz" <[email protected]> Cc: "Mark Struberg" <[email protected]>, "Samuel Mendenhall" <[email protected]>, "Pete Muir" <[email protected]>, "Weld Dev List" <[email protected]> Date: Wednesday, November 10, 2010, 9:01 PM On Wed, Nov 10, 2010 at 3:52 PM, Clint Popetz <[email protected]> wrote: If you go that route, you lose the ability to inject instances of third party classes without defining a @Produces method. That may be preferable to the existing problems caused by default @Dependents, but I wanted to point it out for clarity. 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: void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager beanManager) { event.addAnnotatedType(beanManager.createAnnotatedType(BeanIAm.class)); } -Dan -- Dan Allen Principal Software Engineer, Red Hat | Author of Seam in Action Registered Linux User #231597 http://mojavelinux.com http://mojavelinux.com/seaminaction http://www.google.com/profiles/dan.j.allen _______________________________________________ weld-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/weld-dev
