yes I can see the jndi names on the console. But what I don't understand is how the DI should work. I add my testcase in the EAR with .addAsLibrary(ShrinkWrap.create(JavaArchive.class).addClass(EditableServiceTest.class). For the DI my Testcase should be an EJB or not ?

Or mus I add my Testcase in an other way ??

I have a further question. If I have more then one testcase ( I think that's the normal usecase ) would then arquillian restart the server in managed mode or redploy the ear in remote mode for every testcase ??

currently it will redeploy for every testclass, but keep the server instance running.

That's realy pity. Is that planed for the future ? For some cases I need this behavior. And a redeloyment needs a new initialisationphase for my application.

Aslak Knutsen schrieb:

The TestClass should only be a TestClass. Arquillain TestEnrichers should handle the DI part.

Then I don't know why the DI don't work .

Aslak Knutsen schrieb:

Aslak Knutsen schrieb:

Could you provide a complete example of what you don't get to work?

That's a little bit difficult. I must send the complete code of the warehouse management system of my company. My chef won't be so happy about this situation. . I can try tomorrow wirte a little example.

You could use the portable JNDI names of type "java:app/..." or "java:module/..." instead of "java:global/...". With the former two JNDI namespaces, you can perform lookups of resources that are local to the app, and thereby avoid the problem of adding the app-name to the JNDI name being looked up. You'll need to use java:app if you are performing a lookup of an EJB in a different module (the EJB is a different EJB module, compared to the Web module containing the Arquillian test). You can use java:module if the EJB and the Arquillian test are in the same module.