[jboss-as7-dev] Parameterized config of datasources in standalone.xml

Richard Kilcoyne rkilcoyne at me.com
Wed Feb 8 04:24:50 EST 2012


Using 7.0.2. Here's one of my datasources:

<datasource jndi-name="java:jboss/datasources/tertiary" pool-name="tertiary_pool" jta="true" use-java-context="true" use-ccm="true">
    <connection-url>${datasource.tertiary.url}</connection-url>
    <driver>${datasource.tertiary.driver}</driver>
    <security>
        <user-name>${datasource.tertiary.uid}</user-name>
        <password>${datasource.tertiary.pwd}</password>
    </security>
    <validation>
        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
    </validation>
</datasource>

After the first startup using this configuration, the datasource (and all ${config_vals}) are resolved and re-written to standalone.xml never to be seen again except for in the xml config history as the initial version.

Rick

On Feb 6, 2012, at 9:42 PM, Stuart Douglas wrote:

> I can't reproduce this on upstream. Which AS7 version are you using, and if it is a recent version which properties do you see this happening with?
> 
> Stuart
> 
> 
> 
> On 07/02/2012, at 1:26 PM, Richard Kilcoyne wrote:
> 
>> I'm working on parameterizing my datasources in standalone.xml. Specifying system properties as ${DB_URL} for connection url, username, password works great using properties passed to jboss via -Dapp.properties, but after the first run, the values are permanently substituted in this file. If my external property file is changed, standalone.xml no longer picks up the change. To re-substitute, I have to get the initial version from the standalone_xml_history dir and overwrite the current version. 
>> 
>> Is there a better we to handle external configuration of datasources and if not, is there a better way to reset the standalone.xml config?
>> 
>> Thanks,
>> Rick
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
> 



More information about the jboss-as7-dev mailing list