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)
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:
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?
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!