aspose file tools*
The moose likes Websphere and the fly likes MQ - Server Bindings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "MQ - Server Bindings" Watch "MQ - Server Bindings" New topic
Author

MQ - Server Bindings

Mohammedmd Hussainmd
Greenhorn

Joined: Dec 01, 2008
Posts: 1
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.
 
Don't get me started about those stupid light bulbs.
 
subject: MQ - Server Bindings