I am looking at SCA reference and property injection into EJB fields annotated with @Reference and @Property annotations in an SCA enhanced EJB application. I have created a TuscanyModuleBuilderExtension (MBE) that processes the EJB module built by EJBModuleBuilder. What the MBE does for each injection point is to add a ResourceEnvReferenceInfo object to the EnterpriseBeanInfo.JndiEncInfo and add the object to be injected into the bean's context. Essentially it is mimicking how an @Resource EJB annotation is handled by the EJBModuleBuilder. I see that this approach works. But it may not be the right or the best approach. I would like your comments on this approach, point me to any potentail pit falls that I am not seeing right now and suggest any alternatives.
++Vamsi