This content has been marked as final.
Show 2 replies
-
1. CDI: Get a list of matching beans
ozizka May 22, 2011 8:40 PM (in response to ozizka)Which brings me to my other question:
Is CDI suitable as a "plugin framework"?
By which I mean, for a standalone application which loads plugins from classpath.
I'd (mis)use it's lifecycle for init(), start(), stop(), destroy()...
Any link to an example of such usage is welcome.
-
2. CDI: Get a list of matching beans
alesj May 23, 2011 7:01 AM (in response to ozizka)can I get a list of beans matching given annotations, using anotations?
I mean, can I convert this
java.util.Set<Bean<?>> myBeans = getBeans(Foobar.class, annotation1, ann2, ...);
to this?
@Inject @Anno1 @Anno2 java.util.Set<Bean<?>> myBeans;
Or any plans for it?
I think you're looking for:
* http://docs.jboss.org/cdi/api/1.0-SP4/javax/enterprise/inject/Instance.html