Proactive insights, news and tips from Oracle Fusion Middleware Support. Learn Oracle from Oracle.

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.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.