[webbeans-dev] Injection over Lookup

Andrew Lee Rubinger alr at jboss.org
Sat Jan 24 00:29:21 EST 2009


Hey guys:

Is there a reason we're doing stuff like:

JBossEjb.lookupEjbReferenceResolver(controller).resolveEjb(topLevelDeploymentUnit, 
new EjbReference(beanName, beanInterface, mappedName))

...instead of injecting the reference resolver?

http://anonsvn.jboss.org/repos/jbossas/projects/webbeans-ri-int/trunk/ejb/src/main/java/org/jboss/webbeans/integration/ejb/JBossEjbResolver.java

There are a few other examples where this type of lookup is used.  Given 
only one implementing class per interface, you can even rely upon MC to 
do the autowiring.

S,
ALR

-- 
Andrew Lee Rubinger
Sr. Software Engineer
JBoss, a division of Red Hat, Inc.
http://exitcondition.alrubinger.com



More information about the weld-dev mailing list