Author |
Message
|
neelatul |
Posted: Mon Jul 29, 2002 11:44 am Post subject: PCF - Problem with changing DefXmitQName of a queue manager |
|
|
Novice
Joined: 29 Jul 2002 Posts: 17
|
Hi,
I am a novice Java Programmer and I am trying to use PCF commands in my application.
Many other PCF commands work successful but the following which is for updating Default Transmission Queue Name of a queue manager always fail. There is nothing wrong with the queue manager as other tools work fine.
Can any one please tell me what is wrong in it ?
Any help will be highly appreciated. Thanks in advance.
The error message:
MQJE001: Completion Code 2, Reason 4004
The code:
import com.ibm.mq.*;
import com.ibm.mq.pcf.*;
import java.io.*;
public class Test {
private MQQueueManager queueManager;
public Test () {
try
{
String host="localhost";
int port=1414;
String qmgr="LOCALQM";
String channel="LOCALQM";
String tStr="";
PCFMessage responses[];
PCFMessageAgent agent = new PCFMessageAgent (host, port, channel);
PCFMessage request = new PCFMessage (CMQCFC.MQCMD_CHANGE_Q_MGR);
tStr="OTHER_XMITQ";
for(int i=tStr.length();i<48;i++) tStr=tStr+" ";
request.addParameter (CMQC.MQCA_DEF_XMIT_Q_NAME, tStr);
responses = agent.send (request);
agent.disconnect();
System.out.println("it went successful!");
}
catch (PCFException pcfe)
{
System.err.println ("Error in response: ");
}
catch (MQException mqe)
{
System.err.println (mqe);
System.exit(0);
}
catch (IOException ioe)
{
System.err.println (ioe);
System.exit(0);
}
}
public static void main (String argv[]) {
Test tst = new Test();
}
} |
|
Back to top |
|
 |
clindsey |
Posted: Mon Jul 29, 2002 2:07 pm Post subject: PCF - Problem with changing DefXmitQName of a queue manager |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
4004 is MQRCCF_OBJECT_OPEN. My guess is that you cannot
rename the xmit queue while other processes have it open.
You will probably need to stop all the channels and try it. |
|
Back to top |
|
 |
neelatul |
Posted: Mon Jul 29, 2002 5:19 pm Post subject: |
|
|
Novice
Joined: 29 Jul 2002 Posts: 17
|
That may not be required as it works fine with MQSeries Explorer and MQMon tools, keeping all the queues and channels as it is. |
|
Back to top |
|
 |
mrlinux |
Posted: Tue Jul 30, 2002 6:10 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Does the new queue exist and is it set to be a XMITQ Queue ??? _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
neelatul |
Posted: Tue Jul 30, 2002 8:49 am Post subject: |
|
|
Novice
Joined: 29 Jul 2002 Posts: 17
|
You might have doubted because of the transmission queue name 'OTHER_XMITQ'. But yes, it does exist and it is transmission queue. |
|
Back to top |
|
 |
mrlinux |
Posted: Thu Aug 01, 2002 5:59 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well I copied your code and compiled it, and it fails the same here too _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
|