> On Mar 20, 2015, at 3:29 PM, Jason Greene <jason.greene_at_redhat.com> wrote:
>>
>>> The one case this does not address is what happens when a non-war
>>> non-component lookup class specifies comp in its lookup attribute. However,
>>> (Y) and (A) could be used to correct such occurrences.
>>
>> I'm not sure exactly what your example is, but it sounds like this should
>> be an error case. Is that your proposal, and that the deployer can correct
>> the error by overriding the mapping?
>
> Yes thats correct. If you assume that a common base class which was previously ignored by an implementation had:
>
>
> @Resource(name=“NewName”)
>
> and
>
> @Resource(name=“OldName”, lookup=“java:comp/env/NewName”)
>
> This would fail, but could be remapped or excluded by the deployer.
Actually, even this could be supported, if we define it as all managed beans (including CDI) receive a component namespace which is only reachable during deployment, since managed beans always use the callers naming context during invocation. Implementations can optimize this away by just not storing a binding in memory after deployment.
--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat