I'm not sure why this happened, but it will be easer to debug if you can attach
your sample. :-)
-- Yun Feng
Matthias Berndt wrote:
> Good evening,
>
> I've got two managed beans in a JSF 1.2 webapp. Both beans are quite
> equal. I try to inject a stateless session bean (EJB3) into the managed
> beans.
>
> @EJB(name = "java:comp/env/ejb/CredentialData")
> private CredentialData credentialData;
>
> In the first managed bean the EJB is injected correctly. The second bean
> with exactly the same injection code does not get the EJB. There is no
> error but at runtime credentialData is null.
>
> I get messages like
>
> WARN [startup] Unresolved ejb reference "ejb/CredentialData" in bean
> "GeronimoEnc". Will attempt resolution again at runtime.
>
> but injection works on the first managed bean.
>
> I tried to debug through the code but failed because I didn't understand
> it completely and may be didn't find the right peace.
>
> Can anyone give me an advice?
>
> Thanks
> Matthias Berndt
>
>