This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MQ - Server Bindings

 
Mohammedmd Hussainmd
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

I am trying hard to migrate my program from MQ clinet connection to MQ-Server Bindings.
Here is my Existing core code for Client Connection :
[code]
try {
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setQueueManager(_queueManager);
factory.setHostName(_hostName);
factory.setPort(_portNumber);
factory.setChannel(_channelName);

queueConnection = (QueueConnection) factory.createQueueConnection(" "," ");
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = MQUtilities.getQueue(_queueName, queueSession);
queueReceiver = queueSession.createReceiver(queue);
queueSender = queueSession.createSender(queue);
queueConnection.start();
[code]
I have modified to server Binding like this
[code]
try {
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
//factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
factory.setTransportType(JMSC.MQJMS_TP_BINDINGS_MQ);
factory.setQueueManager(_queueManager);
//Commented these parameters as server Binding need only queueManager Name

//factory.setHostName(_hostName);
//factory.setPort(_portNumber);
//factory.setChannel(_channelName);

queueConnection = (QueueConnection) factory.createQueueConnection(" "," ");
queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
queue = MQUtilities.getQueue(_queueName, queueSession);
queueReceiver = queueSession.createReceiver(queue);
queueSender = queueSession.createSender(queue);
queueConnection.start();
[code]
I am getting MQJMS2013 invalid security authentication supplied for MQQueueManager at line
[code]
factory.createQueueConnection(" "," ");
[code]
Can anybody kindly help me on this. Please suggest whether my changes are correct? How the server binding can be done using MQQueueConnectionFactory.

Your help in this would be highly appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic