This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes IBM MQ 'remote put' problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "IBM MQ Watch "IBM MQ New topic

IBM MQ 'remote put' problem

Gerald Luckenbill

Joined: Nov 05, 2003
Posts: 15
I can't get the following code to work when I am trying to access a queue remotly - the queue is on a Unix server and my java program, which contains this snipet, is sitting on a Windows client - I am new to JMS so it could be something obvious. But, this code works fine when I accessing a local queue on my windows client. I am using IBM MQSeries.
public String put() {
try {
QueueConnectionFactory factory = null;
factory = new MQQueueConnectionFactory();
((MQQueueConnectionFactory) factory).setHostName(my_hostname);
((MQQueueConnectionFactory) factory).setPort(my_port);
((MQQueueConnectionFactory) factory).setChannel(my_channel);
//don't think I need this setTargetClient do I?
//(( queue).setTargetClient(

((MQQueueConnectionFactory) factory).setQueueManager(my_queueManagerName);
System.out.println("break 1!");

javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'my_queue_manager_name' MQJE001: Completion Code 2, Reason 2058

my_connection = factory.createQueueConnection();
System.out.println("break 2!");
my_session = my_connection.createQueueSession(
System.out.println("break 3");
my_queue = (Queue) my_session.createQueue(my_queueName);
my_queueSender = my_session.createSender(my_queue);
etc. etc.

} //end put

-Many Thanks-
It is sorta covered in the JavaRanch Style Guide.
subject: IBM MQ 'remote put' problem
Similar Threads
IBM MQ :: getting MQQueueConnection object
JMS: report options
message proority in JMS MQ
MQ - Server Bindings
How to set Message priority for JMS MQ?