Installing and testing the resource adapter in Wildfly

If we are installing the IBM MQ resource adapter in Wildfly V10, we must first make some configuration file changes to add a subsystem definition for the IBM MQ resource adapter. We can then deploy the resource adapter and test it by installing and running the installation verification test (IVT) application.


Important: These instructions are for Wildfly V10.

This task assumes that we have a running WildFly application server, and that we are familiar with standard administration tasks for it. This task also assumes that we have an IBM MQ installation and that we are familiar with standard administration tasks.


Procedure

  1. Create an IBM MQ queue manager called ExampleQM, and set it up as described in Configure a queue manager to accept client connections on Windows, UNIX and IBM i. When setting up the queue manager, note the following points:

    • The listener must be started on port 1414.
    • The channel to be used is called SYSTEM.DEF.SVRCONN.
    • The queue used by the IVT application is named TEST.QUEUE.

    The model queue SYSTEM.DEFAULT.MODEL.QUEUE also needs to be granted DSP and PUT authority so this application can create a temporary reply queue.

  2. Edit the configuration file WildFly_Home/standalone/configuration/standalone-full.xml and add the following subsystem:
    <subsystem xmlns="urn:jboss:domain:resource-adapters:4.0">
        <resource-adapters>
            <resource-adapter id="wmq.jmsra">
                <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/ivt/IVTCF" enabled="true" use-java-context="true"
                                           pool-name="IVTCF">
                        <config-property name="channel">SYSTEM.DEF.SVRCONN
                        </config-property>
                        <config-property
                                         name="hostName">localhost
                        </config-property>
                        <config-property name="transportType">
                            CLIENT
                        </config-property>
                        <config-property name="queueManager">
                            ExampleQM
                        </config-property>
                        <config-property name="port">
                            1414
                        </config-property>
                    </connection-definition>
                    <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl"
                                           jndi-name="java:jboss/jms/ivt/JMS2CF" enabled="true" use-java-context="true"
                                           pool-name="JMS2CF">
                        <config-property name="channel">
                            SYSTEM.DEF.SVRCONN
                        </config-property>
                        <config-property name="hostName">
                            localhost
                        </config-property>
                        <config-property name="transportType">
                            CLIENT
                        </config-property>
                        <config-property name="queueManager">
                            ExampleQM
                        </config-property>
                        <config-property name="port">
                            1414
                        </config-property>
                    </connection-definition>
                </connection-definitions>
            <admin-objects>
                <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy"
                              jndi-name="java:jboss/jms/ivt/IVTQueue" pool-name="IVTQueue">
                    <config-property name="baseQueueName">
                        TEST.QUEUE
                    </config-property>
                    </admin-object>
                </admin-objects>
            </resource-adapter>
        </resource-adapters>
    </subsystem>
  3. Deploy the resource adapter to your server by copying the wmq.jmsra.rar file into the directory WildFly_Home/standalone/deployments.
  4. Deploy the IVT application by coping the wmq.jmsra.ivt.ear file into the directory WildFly_Home/standalone/deployments.
  5. Start the application server, by bringing up a command prompt, navigating to the directory WildFly_Home/bin and running the command:
    standalone.bat -c standalone-full.xml
  6. Run the IVT application. For more information, see Verify the resource adapter installation. For Wildfly, the default URL is http://localhost:8080/WMQ_IVT/.

Parent topic: Use the IBM MQ resource adapter