1 2 Previous Next 16 Replies Latest reply on Nov 27, 2010 9:01 AM by aslak Go to original post
      • 15. Re: arquillian EJB unit testing, JBoss 5.0.1 CR2 EAP, EJB JNDI lookup fails
        henk53

        Aslak Knutsen wrote:

         

        Interesting idea. Should be doable, but still missing the application/module name part of the jndi name(ee6). This is why we're required to deploy as test.ear/test.jar with ejbs..

         

        I understand. This is actually a general problem for 'normal' code too, knowing your own application and module names from within a deployment.

         

        Maybe a similar trick as with adding a generated EJB bean to the deployment is possible here. You can read the application and module names from the shrinkwrap archive that the user's test returns, then add some resource file that contains this info to the archive (e.g. META-INF/arquillian-info.xml). From within the deployment you can then read this file back.

        • 16. Re: arquillian EJB unit testing, JBoss 5.0.1 CR2 EAP, EJB JNDI lookup fails
          aslak

          To some extent we can read this info out of the Deployment, but it can be overwritten based on application.xml, ejb-jar.xml, deployment plans, container deployment descriptors,  server configuration etc etc etc. Basically we would have to reimpl the ee deployment model + all the server specific versions to understand what we are deploying, even with that the server it self can be configured to override it.. so we're basically just moved from guessing to a little aducated guessing. The server is still the only one that knows  100% where this will end up.

           

          But some of these ideas will help for the older servers, even tho it's not perfect.

           

          We will be prototyping these hooks in JBoss 6/7, and maybe OpenEJB. A goal would be to push these hooks into 'EE7'. We have all this with CDI in EE6, but there are some other specs that are still a bit to black box, which makes it hard to integrate with for 3. party frameworks.

          1 2 Previous Next