Yes. What you want to accomplish is called "injecting into a non-contextual instance", or in other words "injecting into a non-bean instance". The object is an injection target.
Hi guys,
I wonder if it's possible to offer a set of bean instances (not-managed by
the container) so that their dependencies are satisfied by the container. As
an example, you can grab a Spring BeanFactory and call autowire on it, like
this
app.applicationContext.getAutowireCapableBeanFactory()
.autowireBeanProperties(instance,
AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false)
Is there a similar API in Weld/CDI?
TIA
Andres
--
View this message in context: http://weld-development-discussions.46994.n3.nabble.com/Offering-beans-post-container-initialization-tp2656992p2656992.html
Sent from the Weld development discussions mailing list archive at Nabble.com.
_______________________________________________
weld-dev mailing list
weld-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev