0 Replies Latest reply on Nov 25, 2013 10:14 AM by Ivan Zbykovskyi

    Rebinding value of variable in JNDI (JBoss AS 7.1.1.Final)

    Ivan Zbykovskyi Newbie

      Hi all!

      I have some variable JNDI binding in standalone.xml

              <subsystem xmlns="urn:jboss:domain:naming:1.1">

                  <bindings>

                      <simple name="java:global/test-variable" value="TEST"/>

                  </bindings>

              </subsystem>

      And i have JBoss AS 7.1.1.Final up and running.

      I see this variable in administration console in Profile/Container/Naming/java:global.

       

      Then I`m performing tests with Arquillian framework one by one. And one of my tests doing next thing:

              InitialContext initCtx = new InitialContext();

              try {

                  initCtx.rebind("java:global/test-variable", TEST2);

              } finally {

                  initCtx.close();

              }

      After that this variable disappears from administration console in Profile/Container/Naming/java:global and this variable become not accessible from JNDI.

       

      Next test execution with initCtx.lookup(("java:global/test-variable") throwing NamingException after  initCtx.rebind("java:global/test-variable", TEST2) in previous test execution.

       

      Does anybody know - is it server`s bug with rebinding "java:global" variable?