This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: MQ - Server Bindings
 
Similar Threads
looking for MDB
P2P using WSAD's embedded JMS- Naming Exception
JMS REMOTE CONNECTION Problems
P2P using WSAD's embedded JMS- Naming Exception
How to receive message from a MDB?