+

Search Tips   |   Advanced Search

Define outbound chains for IBM MQ interoperation

We can define new outbound chains using the wsadmin utility. These chains can be used for interoperating with IBM MQ.

The channels used to build an outbound chain determine with which configurations of the IBM MQ queue manager sender channel so a network connection can be successfully established. The following table shows all the valid chain configurations and describes the configuration of aIBM MQ queue manager sender channel with which they can be used to establish a connection.

channel Unsecured channel channel secured using SSL
TCP channel X X
SSL channel
X
MQFAP channel X X

For example, an SSL-based chain would consist of a TCP channel, SSL channel and MQFAP channel. When creating chains, the order of channels in the chain is important. Specify channels in the order in which they appear in the table.

The example in this topic describes how to create an outbound chain capable of being used to contact IBM MQ queue manager receiver channels using SSL-based encryption.

(iSeries) Note: You open a wsadmin command session from within Qshell. For more information, see the topic "Configure Qshell to run WebSphere Application Server scripts".


Tasks

  1. Locate the TransportChannelService object for the server in which we want to create the new chain. For example, in a WAS Network Deployment configuration, we can list the available TransportChannelService objects and select the appropriate service.

    Use Jython:

      wsadmin>AdminConfig.list("TransportChannelService" )

      (cells/BadgerCell01/nodes/BadgerCellManager01/servers/dmgr|server.xml#TransportChannelService_1) (cells/BadgerCell01/nodes/BadgerNode01/servers/nodeagent|server.xml#TransportChannelService_1095711814579) (cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#TransportChannelService_1095712023139) (cells/BadgerCell01/nodes/BadgerNode01/servers/server2|server.xml#TransportChannelService_109571 2039302)

      wsadmin>tcs = AdminConfig.list("TransportChannelService" ).split("\r\n")[2]

    Use Jacl:

      wsadmin> $AdminConfig list TransportChannelService

      (cells/BadgerCell01/nodes/BadgerCellManager01/servers/dmgr|server.xml#TransportChannelService_1) (cells/BadgerCell01/nodes/BadgerNode01/servers/nodeagent|server.xml#TransportChannelService_1095711814579) (cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#TransportChannelService_1095712023139) (cells/BadgerCell01/nodes/BadgerNode01/servers/server2|server.xml#TransportChannelService_1095712039302)

      wsadmin> set tcs [lindex [$AdminConfig list TransportChannelService] 2]

      (cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#TransportChannelService_1095712023139)

  2. Define an outbound TCP channel called testTCPChannel.

    Use Jython:

      wsadmin>tcpChannel = AdminConfig.create("TCPOutboundChannel", tcs, [["name", "testTCPChannel"]] )

    Use Jacl:

      wsadmin>set tcpChannel [$AdminConfig create TCPOutboundChannel$tcs "{name testTCPChannel}"]

      testTCPChannel(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#TCPOutboundChannel_1095969213949)

  3. Define an outbound SSL channel called testSSLChannel. There are two steps required to define such a channel.

    1. Identify the SSL alias to be used by the channel.

      Use Jython:

      wsadmin>for obj in AdminConfig.list("SSLConfig" ).split("\r\n"): 
      print obj+AdminConfig.show(obj, "alias")
      

      Use Jacl:

        wsadmin>foreach obj [$AdminConfig list SSLConfig] { puts "$obj

        [$AdminConfig show $obj alias]]" } (cells/BadgerCell01|security.xml#SSLConfig_1) {alias BadgerCellManager01/DefaultSSLSettings}] (cells/BadgerCell01|security.xml#SSLConfig_1095711819776) {alias BadgerNode01/DefaultSSLSettings}]

    2. Create an SSL channel as in the following example, in which the BadgerNode01/DefaultSSLSettings alias is used.

      Use Jython:

        wsadmin>sslChannel = AdminConfig.create("SSLOutboundChannel", tcs, [["name", "testSSLChannel"], ["sslConfigAlias","BadgerNode01/DefaultSSLSettings"]])

      Use Jacl:

        wsadmin>set sslChannel [$AdminConfig create SSLOutboundChannel $tcs

        "{name testSSLChannel} {sslConfigAlias BadgerNode01/DefaultSSLSettings}"] testSSLChannel(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#SSLOutboundChannel_1095971760671)

  4. Define an outbound MQFAP channel called testMQFAPChannel.

    Use Jython:

      wsadmin>mqfapChannel = AdminConfig.create("MQFAPOutboundChannel", tcs, [["name", "testMQFAPChannel"]] )

    Use Jacl:

      wsadmin>set mqfapChannel [$AdminConfig create MQFAPOutboundChannel $tcs

      "{name testMQFAPChannel}"] testMQFAPChannel(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#QFAPOutboundChannel_1095977512682)

  5. Finally, create the channel chain by combining the channels defined so far. For example, to create a chain called testChain:

    Use Jython:

      wsadmin>AdminConfig.create("Chain", tcs, [["name", "testChain"], ["enable", "true"], ["transportChannels", [tcpChannel, sslChannel, mqfapChannel]]] )

    Use Jacl:

      wsadmin>$AdminConfig create Chain $tcs "{name testChain} {enable true}

      {transportChannels {$tcpChannel $sslChannel $mqfapChannel}}" testChain(cells/BadgerCell01/nodes/BadgerNode01/servers/server1|server.xml#Chain_1095977640896)