geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Berndt <>
Subject EJB Injection in Managed Bean
Date Wed, 16 Jul 2008 22:21:36 GMT
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

@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?

Matthias Berndt

View raw message