Friday Dec 27, 2013

Basic MQ 7.5 Configuration for SOA Suite 11g (MQ Adapter)

I recently went through an exercise to install, configure and interact with MQ 7.5 through a composite and thought I would share my notes. This is not meant to be a full tutorial on MQ configuration with SOA but more of a cheat sheet to avoid wasting a lot of time like I did. I also make no claim to be an MQ admin so if you see something that's wrong or would benefit from clarification, please add a comment.


MQ Steps:
  1. Download MQ 7.5 from the IBM site (90 day trial license, Windows)

  2. Ran setup which was straightforward. Several questions concerning the domain controller but I said that I don't have any running Win 2000

  3. Started MQ Explorer and created a Queue Manager. Specified Transmission and DeadLetter queues along with exposing an external channel

  4. Created my queueus: Transmission, DeadLetter, LocalQueue1, LocalQueue2

  5. Created a 'Server-connection' channel. Note that the Channel may have a status of 'Inactive' and a red arrow pointing down. I spent a ton of time trying to get the arrow to be green and pointing up with a status of 'Active' but in the end it didn't seem to matter.

  6. Created a new user on the Windows machine that I wanted to connect to MQ as remotely

  7. Added the user to the Channel 'Specific Profiles' Authority Records and gave them all of the authorizations. Right click on the Channel -> Object Authorities -> Manage Authority Records -> Specific Profiles. There should be a default Specific Profile you can edit.

  8. Note: If you want to disable the security for the Channel you can go into the Authority Records and delete the default profile

  9. Using the command 'setmqaut -m <Queue Manager Name> -t qmgr -p <user@pcname> +all' I granted full MQ privs to the new user (command is in <MQ_HOME>/bin)



SOA Steps:
  1. Add the MQ jar files to <DOMAIN_HOME>/lib: com.ibm.mq.commonservices.jar, com.ibm.mq.headers.jar, com.ibm.mq.jar, com.ibm.mq.jmqi.jar, com.ibm.mq.pcf.jar (all can be obtained from the MQ Installation)

  2. Created a new composite application with input and output MQ Adapter instances

  3. The adapters both used the default 'eis/MQ/MQAdapter' JNDI from the default connection pool but be careful b/c the default JNDI in the Adapter wizard is 'eis/MQ/MQSeriesAdapter'. If you don't change it or create a new connection pool then the adapter will fail.

  4. Other values in the adapter wizard were defaults or obvious (queue name and my schema)

  5. In the WLS Console I went into the MQ Adapter deployment -> Configuration -> Connection Pool -> Default Pool to change set some properties

  6. Set channelName, hostName, password, queueManagerName, userID. Everything else I left as default.

  7. Deployed and ran the composite, verifying that the message ended up in the right MQ queue



I ran into some errors along the way:

MQJE001: Completion Code '2', Reason '2035': Due to insufficient permissions for the user I was trying to connect as. To resolve this I had to add the permissions using the 'setmqaut' command mentioned above. To make it simple I just granted full admin.

java.util.MissingResourceException: We document that you can get this if you don't have the correct MQ jar files in <DOMAIN_HOME>/lib. In my case it was due to a missing or wrong Channel Name configured in the connection pool properties.

Admittedly much of this is documented across various resources but I couldn't find anything that provided it all together. Now when I need to do this again in a year and have forgotten everything I'll have this blog post to come back to.

If everything works then you'll see the messages appear in the queue through MQ Explorer where you can then insepct the payload, etc.
About

This is the official blog of the SOA Proactive Support Team. Here we will provide information on our activities, publications, product related information and more. Additionally we look forward to your feedback to improve what we do.

Search

Categories
Archives
« December 2013 »
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
28
29
30
31
    
       
Today