JBoss Community

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

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

Hi everyone

 

I'm using Jboss-as 7.1.1

 

I have configured the resource adapter as below in the standalone.xml file. This basically is the configuration for a outbound queue using Websphere MQ and it works fine.

 

 

<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
            <resource-adapters>
                <resource-adapter>
                    <archive>
                        wmq.jmsra.rar
                    </archive>
                    <transaction-support>NoTransaction</transaction-support>
                    <connection-definitions>
                        <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:jboss/jms/MQConnectionFactory" enabled="true" use-java-context="false" pool-name="MqConnectionFactoryPool">
                            <config-property name="port">
                                3434
                            </config-property>
                            <config-property name="hostName">
                                myhost
                            </config-property>
                            <config-property name="channel">
                                CLIENT.TO.AUIHTA01
                            </config-property>
                            <config-property name="transportType">
                                CLIENT
                            </config-property>
                            <config-property name="queueManager">
                                AUIHTA01
                            </config-property>
                        </connection-definition>
                    </connection-definitions>
                    <admin-objects>
                        <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:jboss/jms/MQOutboundQueue" enabled="true" use-java-context="false" pool-name="MyQueue1Pool">
                            <config-property name="baseQueueManagerName">
                                AUIHTA01
                            </config-property>
                            <config-property name="baseQueueName">
                                XX.CBO.OUT
                            </config-property>
                        </admin-object>
                    </admin-objects>
                </resource-adapter>
            </resource-adapters>
        </subsystem>

 

 

My requirement is that I need to externalise the configs such as hostName, port etc. This is because I want to change it based on different environments such as development,QA,Live etc.

Basically I want to know if these parameters can be externalised to a file so that it can be incuded in my deployment war file or ear file.

 

 

Thanks!

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community