-
1. Re: Does Arquillian support double EJB injection?
bmajsak Jun 19, 2013 5:19 PM (in response to flaviomattos86)That should work without any problems, as you basically deploy it to the container which handles EJBs. Just remember package your test deployment properly (similar to what you do for the real archive)
-
2. Re: Does Arquillian support double EJB injection?
flaviomattos86 Jun 20, 2013 1:27 PM (in response to bmajsak)Hi Bartosz, thank you for your reply.
I have tried to do what I asked in the beginning but I am facing a weird problem:
I am using embedded glassfish (arquillian-glassfish-embedded-3.1, version 1.0.0.CR3 and glassfish-embedded-all, version 3.1.2) to inject my ejbs, but I get a NamingException.
Arquillian tries to lookup my ejbs with the name java:comp/env/br.com.flavio.arquillian.test.TestArquillian/testEAO but in the eclipse console I could see that glassfish has different names for my ejb:
java:global/test/TestEAOImpl!com.flavio.test.eao.TestEAORemote, java:global/test/TestEAOImpl!com.flavio.test.eao.TestEAOLocal
com.flavio.test.eao.TestEAORemote, com.flavio.test.eao.TestEAORemote#com.flavio.test.eao.TestEAORemote
I can not understand that, because I am not using mappedName property in any annotation, I mean I am just using @Local, @Remote, @Stateless and @EJB without any attribute in these annotations
What am I doing wrong? Am I missing some configuration?
Thanks
-
3. Re: Does Arquillian support double EJB injection?
flaviomattos86 Jun 20, 2013 2:17 PM (in response to flaviomattos86)Actually I have the answer for my question..
The problem was that I was trying to inject the local interface with @EJB annotation. Now I inject the remote interface and everything works!
@EJB
TestEJBRemote testEJBRemote;
Thanks