4 Replies Latest reply on Sep 18, 2008 9:27 AM by Alexey Loubyansky

    Datasource deployer does not substitute system properties

    Scott McNab Newbie

      We use system property substitution to assist with the configuration of our JBoss installations. This was working fine with JBoss 4.2.3.GA, however it appears to be broken in 5.0.0.CR1.

      Specifically, it appears that system properties are not being substituted when deploying datasources.

      For example, consider this default-ds.xml:

      <?xml version="1.0" encoding="UTF-8"?>
       <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
       <type-mapping>PostgreSQL 8.0</type-mapping>
       <!-- minimum connection pool size -->
       <!-- maximum connection pool size -->

      With JBoss 4.2.3.GA we are successfully able to configure the datasource using properties supplied by the SystemPropertiesService. With JBoss 5.0.0.CR1 it appears the property substitution is not performed, and the datasource fails to deploy correctly.

      To confirm this, we changed the jndi-name property line to the following:

      and then added -Dvieo.datasource.name=DefaultDS to the JVM command line.

      The server log confirms that the system property is not being substituted:

      2008-09-17 16:31:00,948 41048 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main:) Bound Connection
      Manager 'jboss.jca:service=DataSourceBinding,name=${vieo.datasource.name}' to JNDI name 'java:${vieo.datasource.name}'

      The strange thing is that this same system property substitution DOES work for all other deployment files types (other than datasources), including mail-service.xml, jbossweb.sar/server.xml, messaging/messaging-service.xml, etc.

      Is this behaviour to be expected, or is it a bug with the datasource deployer?