JBoss Community

Re: Externalizing resource adapter configs from standalone.xml in Jboss-as 7.1.1

created by Doug Grove in Beginner's Corner - View the full discussion

This is certainly possible.  Note that JBoss supports a variety of property substitutions.  For example, in the standalone.xml file, you could have:

 

    <system-properties>

        <property name="wmq.host" value="10.0.0.150"/>

        <property name="wmq.port" value="1414"/>

    </system-properties>

 

Then:

 

                    <connection-definitions>

                        <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:/WSMQ" enabled="true" pool-name="WSMQ" use-ccm="true">

                            <config-property name="port">

                                ${wmq.port}

                            </config-property>

                            <config-property name="hostName">

                                ${wmq.host}

                            </config-property>

 

This applies as well to ejb-jar.xml files and jboss.xml files.  Ensure that the proper property substitutions are enabled in standalone.xml:

 

        <subsystem xmlns="urn:jboss:domain:ee:1.1">

            <spec-descriptor-property-replacement>true</spec-descriptor-property-replacement>

            <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>

        </subsystem>

 

 

 

Hope that helps,

 

Doug

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community