0
votes

I have been provided by USER_ID and PASSWORD from MQ Administrator to connect to IBM MQ from our JMS application hosted on Webloigc 12c (12.1.3).

Following is the configuration made by me in Weblogic:- 1. Create a foreign server. Specified JNDI initial context factory as "com.sun.jndi.fscontext.RefFSContextFactory" and JNDI connection URL as path of .bindings file.

  1. Create destination in foreign server.

  2. Create connection factory in foreign server. Specified the username and password provided by MQ administrator.

  3. Restarted the server.

After restart, server log show the error "JMSWMQ2013" and MQ administrator reported that following error

----- cmqxrsrv.c : 2321 -------------------------------------------------------
09/30/2016 11:09:46 AM - Process(10686.64) User(mqm) Program(amqzlaa0)
                    Host(vlq9dmqsdv01.fulcrumlimited.ca) Installation(Installation1)
                    VRMF(8.0.0.4) QMgr(FCSWIFTD)

AMQ5540: Application 'weblogic.Server' did not supply a user ID and password

MQ Administrator also reported that he is receive User ID as OS user which created EJB and not the one specified in Foreign Server.

What configuration I need to do, so that weblogic send proper username and password to IBM MQ.

1

1 Answers

1
votes

You can pass a user identifier and a password via the JMS API call:

  javax.jms.ConnectionFactory.createConnection(String, String)

or, if using the simplified JMS 2.0 API:

  javax.jms.ConnectionFactory.createContext(String, String)

where the first String parameter is the user identifier passed to MQ when establishing a connection and the second parameter is the password.

If you don't supply the user credentials via the API calls noted above, the MQ classes for JMS will default to sending the user identifier that started the JVM to the MQ queue manager on the connection and no password.

For reference: https://docs.oracle.com/javaee/7/api/javax/jms/ConnectionFactory.html