3 Replies Latest reply on Jun 3, 2016 1:26 AM by Amit Nijhawan

    Variable expansion in jndi-name definition?

    Kristi Skeens Newbie

      We would like to use a variable in our jndi-name definition in standalone.xml. It doesn't appear to be working though.  Many google searches have proved fruitless. Is there some escaping, or other method necessary to make this work? It works fine for pool-name as we have defined db.pool in a properties file that is referenced upon starting JBoss.

       

      <datasource jta="true" jndi-name="java:jboss/datasources/${db.pool}" pool-name="${db.pool}" enabled="true" use-ccm="false">

       

      JBoss sees the jndi-name as literally java:jboss/datasources/$db.pool and thus fails when the app tries to reach to it. We tried removing the curly braces, escaping with \, $, throwing more " around it. Nothing works.

       

      Thanks in advance.