You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Matthias Berndt <be...@gmx.de> on 2008/07/17 00:21:36 UTC
EJB Injection in Managed Bean
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
Re: EJB Injection in Managed Bean
Posted by Matthias Berndt <be...@gmx.de>.
On Thu, 2008-07-17 at 00:21 +0200, Matthias Berndt wrote:
> 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 tell me the class and the method parsing the anotations for
injection?
Re: EJB Injection in Managed Bean
Posted by eveeve <go...@msn.com>.
Hi,
I can't get this sample:
Sample:
http://systemtrap.net/ltg3.tar.gz
Thanks
eve
Matthias Berndt wrote:
>
> On Wed, 2008-07-16 at 18:00 -0700, YunFeng Ma wrote:
>> I'm not sure why this happened, but it will be easer to debug if you
>> can attach your sample. :-)
>
> Sorry it took some time to strip it down and remove some cruft.
>
> Sample:
> http://systemtrap.net/ltg3.tar.gz
>
>
>
--
View this message in context: http://www.nabble.com/EJB-Injection-in-Managed-Bean-tp18497939s134p19980915.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: EJB Injection in Managed Bean
Posted by eveeve <go...@msn.com>.
Hello Jarek,
Thanks for your reply. I'm actually using Sun Application server.
eve
Jarek Gawor-2 wrote:
>
> This should be fixed. Please try with the latest 2.1.4-SNAPSHOT
> (http://people.apache.org/builds/geronimo/server/binaries/2.1/latest/)
> or 2.2-SNAPSHOT
> (http://people.apache.org/builds/geronimo/server/binaries/trunk/latest/)
>
> Jarek
>
> On Mon, Sep 29, 2008 at 6:49 PM, eveeve <go...@msn.com> wrote:
>>
>> Hi,
>>
>> I have been struggling with the exct same problem. my ejb injection to my
>> interface comes up with a null. Could somebody help please. I've attach
>> files.
>>
>> Thanking you.
>>
>> eve
>>
>> http://www.nabble.com/file/p19733231/ejbsam.rar ejbsam.rar
>>
>> Matthias Berndt-4 wrote:
>>>
>>> On Wed, 2008-07-16 at 18:00 -0700, YunFeng Ma wrote:
>>>> I'm not sure why this happened, but it will be easer to debug if you
>>>> can attach your sample. :-)
>>>
>>> Sorry it took some time to strip it down and remove some cruft.
>>>>
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/EJB-Injection-in-Managed-Bean-tp18497939s134p19733231.html
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/EJB-Injection-in-Managed-Bean-tp18497939s134p19740476.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: EJB Injection in Managed Bean
Posted by Jarek Gawor <jg...@gmail.com>.
This should be fixed. Please try with the latest 2.1.4-SNAPSHOT
(http://people.apache.org/builds/geronimo/server/binaries/2.1/latest/)
or 2.2-SNAPSHOT
(http://people.apache.org/builds/geronimo/server/binaries/trunk/latest/)
Jarek
On Mon, Sep 29, 2008 at 6:49 PM, eveeve <go...@msn.com> wrote:
>
> Hi,
>
> I have been struggling with the exct same problem. my ejb injection to my
> interface comes up with a null. Could somebody help please. I've attach
> files.
>
> Thanking you.
>
> eve
>
> http://www.nabble.com/file/p19733231/ejbsam.rar ejbsam.rar
>
> Matthias Berndt-4 wrote:
>>
>> On Wed, 2008-07-16 at 18:00 -0700, YunFeng Ma wrote:
>>> I'm not sure why this happened, but it will be easer to debug if you
>>> can attach your sample. :-)
>>
>> Sorry it took some time to strip it down and remove some cruft.
>>>
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/EJB-Injection-in-Managed-Bean-tp18497939s134p19733231.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>
Re: EJB Injection in Managed Bean
Posted by eveeve <go...@msn.com>.
Hi,
I have been struggling with the exct same problem. my ejb injection to my
interface comes up with a null. Could somebody help please. I've attach
files.
Thanking you.
eve
http://www.nabble.com/file/p19733231/ejbsam.rar ejbsam.rar
Matthias Berndt-4 wrote:
>
> On Wed, 2008-07-16 at 18:00 -0700, YunFeng Ma wrote:
>> I'm not sure why this happened, but it will be easer to debug if you
>> can attach your sample. :-)
>
> Sorry it took some time to strip it down and remove some cruft.
>>
>
>
>
--
View this message in context: http://www.nabble.com/EJB-Injection-in-Managed-Bean-tp18497939s134p19733231.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.