1 Reply Latest reply on Mar 13, 2012 5:21 AM by ochaloup

    Problem with AS7 testsuite - multinode testing - incorrect jndi lookup

    ochaloup

      Hi,

       

      I have an issue and I want to ask whether is this bug or misconfiguration.

       

      I have test in AS7 testsuite in multinode part where 2 AS7 JBoss servers are run in parallel. The first server is defined to have remote connection to second one.

      I have a Stateful bean placed in both servers. I would like to run test on  first server. But prolem is that when I want to do a jndi lookup Arquillian open connection to second server.

       

      You can check sourcecode of my test here: https://github.com/ochaloup/jboss-as/blob/0fcf1383ffec86f8b1cb8aeee5feed606b27ec3c/testsuite/integration/multinode/src/test/java/org/jboss/as/test/multinode/problem/TestTestCase.java

      Definition of arquillian.xml is here: https://github.com/ochaloup/jboss-as/blob/0fcf1383ffec86f8b1cb8aeee5feed606b27ec3c/testsuite/integration/multinode/src/test/config/arq/arquillian.xml

       

      I have named deployments, defined on which container they should run and the tests are annotated with @OperateOnDeployment.

      The workaround for my problem is to create a "client bean" which is place only on the first server and then make a local call for the statefulbean which I want to use. Then arquillian correctly lookuped the client bean and started to work with it. But when the test called directly the stateful bean it was invoked that one placed on second server.

       

      Then I would have an additional question. Could I define the same archive name for two deployments which go to different servers? When I defined the same archive name in this test then arquillian works (or makes lookups) just on the second server.

       

      Thank you

        • 1. Re: Problem with AS7 testsuite - multinode testing - incorrect jndi lookup
          ochaloup

          Ouch, I'm sorry for the question. It was my fault. I was fighting with this problem and it seems to me that it could be problem of Arquillian but finally I found out that the problem with jndi lookup was cause by definition of client deployment.

          File jboss-ejb-client.xml which enable remote connection amongst servers defined attribute exclude-local-receiver="true" which denied to make other than remote lookups.