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!
--- On Wed, 11/10/10, Dan Allen <dan.j.allen(a)gmail.com> wrote:
From: Dan Allen <dan.j.allen(a)gmail.com>
Subject: Re: [weld-dev] A significantly negative article on Weld
To: "Clint Popetz" <cpopetz(a)gmail.com>
Cc: "Mark Struberg" <struberg(a)yahoo.de>, "Samuel Mendenhall"
<samuel.mendenhall(a)gmail.com>, "Pete Muir"
<pmuir(a)bleepbleep.org.uk>, "Weld Dev List"
Date: Wednesday, November 10, 2010, 9:01 PM
On Wed, Nov 10, 2010 at 3:52 PM, Clint Popetz <cpopetz(a)gmail.com> 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
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597