1 Reply Latest reply on Aug 11, 2011 1:31 AM by jaikiran

    Change in JNDI behavior in the latest build

    webmarck

      Hello

       

      The JNDI behavior has change in build (#1493)

       

      I have a datasource in my standalone.xml that looks like this

       

                  <xa-datasource jndi-name="e-TL/jdbc/e-TL_DataSource-0" pool-name="e-TL_DataSource-0_Pool" enabled="true" use-java-context="true" use-ccm="true">

       

       

      When I start the server I get the following error

       

      14:11:12,799 ERROR [org.jboss.as.controller] (Controller Boot Thread) Operation ("add") failed - address: ([

          ("subsystem" => "datasources"),

          ("xa-data-source" => "e-TL/jdbc/e-TL_DataSource-0")

      ]): java.lang.RuntimeException: Illegal context in name: java:e-TL/jdbc/e-TL_DataSource-0

       

      looks to me that the code need to add a / after the java:

       

      If I change it to

       

                  <xa-datasource jndi-name="java:/e-TL/jdbc/e-TL_DataSource-0" pool-name="e-TL_DataSource-0_Pool" enabled="true" use-java-context="true" use-ccm="true">

       

      Then it works.

       

      Is that a bug or working as designed?

       

        • 1. Re: Change in JNDI behavior in the latest build
          jaikiran

          It's by design that the jndi address should be java:/<name>. But it's a bug that the datasource configuration doesn't set it up correctly for you. If you have:

           

          <xa-datasource jndi-name="e-TL/jdbc/e-TL_DataSource-0" pool-name="e-TL_DataSource-0_Pool" enabled="true" use-java-context="true" use-ccm="true">

           

          then the datasource processor should automatically set it up at java:/e-TL/jdbc/e-TL_DataSource-0 instead of java:e-TL/jdbc/e-TL_DataSource-0. I'll check what needs to be fixed.

           

          Thanks for reporting.