0 Replies Latest reply on Jun 20, 2011 4:27 PM by chodgespdx

    Jboss 5.1.0GA *-ds.xml property substitution issue

    chodgespdx

      I have a faily simple setup using the default server, like so:

       

      conf/

      app.properties

       

      deploy/

      app.war

      properties-service.xml

      app-ds.xml

       

      app.properites contains:

       

      dataSourceJNDIName=MYAPPDS

       

      properties-service.xml contains:

       

        <mbean code="org.jboss.varia.property.SystemPropertiesService"
               name="jboss:type=Service,name=SystemProperties">

       

          <attribute name="URLList">
            ./conf/app.properties
          </attribute>

          <attribute name="Properties">exo.conf.dir.name=gatein</attribute>

        </mbean>

       

      app-ds.xml contains:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <datasources>
         <local-tx-datasource>
            <jndi-name>${dataSourceJNDIName}</jndi-name>

      ...

       

      Heres what happens at startup:

       

      ...

      2011-06-20 09:43:38,966 INFO  [org.jboss.varia.property.SystemPropertiesService] (main) Loaded system properties from: file:/C:/jboss-5.1.0.GA/server/default/conf/app.properties

      ...

      2011-06-20 09:43:43,652 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=${dataSourceJNDIName}' to JNDI name 'java:${dataSourceJNDIName}'

      ...

       

      Given that, I tried passing in as part of JAVA_OPTS at JVM start

       

      -DdataSourceJNDIName=MYAPPDS

       

      and I get the same result so the above appears to not be relevant as of yet.

       

      Im looking for any guidance here. I have seen various threads on this topic but havent been able to discern if 5.1.0 should be good with this.