Author |
Message
|
mandos_ |
Posted: Fri Nov 17, 2006 10:20 am Post subject: PCFAgent in SupportPac MS0B |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
Hi!
I was trying to run the sample program ListQueueNames that came with the ms0b, and illustrates how to use PCF.
When I use the PFCAgent constructor "PCFAgent(com.ibm.mq.MQQueueManager qmanager)" i got a 2033 (MQRC_NO_MSG_AVAILABLE), but the command server is running as usual.
When I use the PCFAgent constructor "PCFAgent(java.lang.String host, int port, java.lang.String channel)" it works correctly.
Someone can tell me why I got the 2033 when use the first constructor?
Thanks,
Danilo Barboza. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Nov 17, 2006 10:49 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
shut down the cmdserver and see if a message arrives on the command queue ..... _________________ -wayne |
|
Back to top |
|
 |
mandos_ |
Posted: Fri Nov 17, 2006 11:25 am Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
A message arrives on the command queue (I have started the Queue Monitoring to be sure), but I continue to receive the 2033.
Something else to do?
Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Nov 17, 2006 11:39 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Does anything show up in the dead letter queue? _________________ -wayne |
|
Back to top |
|
 |
mandos_ |
Posted: Fri Nov 17, 2006 11:52 am Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
Nops, Nothing...
It's so strange, 'cause when i use the constructor that specifies the hostname, port and channel, it works correctly, as I said. But it's running for a LOCAL QManger.
I ll do a test with another QManger on another host...
If someone can help me...
Thanks, wschutz. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 17, 2006 12:02 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
mandos_ |
Posted: Fri Nov 17, 2006 12:09 pm Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
Yes, I'm using the latest ms0b...
The sample works correctly with the constructor that specifies only the name of the QManager when I run in another computer.
Maybe something in my WMQ is corrupted. I will analyze it.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 17, 2006 12:18 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The name of the queue manager?
The initial constructor you posted was the one that took a prebuilt MQQueueManager object, rather than the name of the queue manager.
That is,
Code: |
MQQueueManager myQmgr = new MQQueueManager("QM1");
PCFMessageAgent myAgent = new PCFMessageAgent(myQmgr); |
and not
Code: |
PCFMessageAgent myAgent = new PCFMessageAgent("QM1"); |
Which one are you having trouble with? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mandos_ |
Posted: Fri Nov 17, 2006 12:37 pm Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
Yes, yes.... I've tried this two way... But with the PCFAgent and not with the PCFMessageAgent... According the doc that came with ms0b this,
Code: |
PCFAgent myAgent = new PCFAgent("QM1"); |
also works.
Maybe that some corrupted file or object in my WebSphere MQ, as I said. I will investigate it...
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 17, 2006 12:42 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Quote: |
But with the PCFAgent and not with the PCFMessageAgent |
Sorry, that was my typo mistake.
So does
Code: |
PCFAgent myAgent = new PCFAgent("QM1"); |
give you the same result as the working
Code: |
PCFAgent myAgent = new PCFAgent("hostname","channel", port); |
or the same result as the unworking
Code: |
MQQueueManager myQueueMgr = new MQQueueManager("QM1");
PCFAgent myAgent = new PCFAgent(myQueueMgr); |
That is, do either of the methods for establishing a server Connection work? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mandos_ |
Posted: Fri Nov 17, 2006 12:52 pm Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
Sorry, I do a mistake in my communication.
The
Code: |
PCFAgent myAgent = new PCFAgent("QM1"); |
gives me the same result as the unworking
Code: |
MQQueueManager myQueueMgr = new MQQueueManager("QM1");
PCFAgent myAgent = new PCFAgent(myQueueMgr); |
And only the
Code: |
PCFAgent myAgent = new PCFAgent("hostname", port , "channel"); |
works correctly. |
|
Back to top |
|
 |
wschutz |
Posted: Fri Nov 17, 2006 1:39 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
So, you said that it appears the message GOING to the command server is created, correct? Can you stop the cmdserver again, run your program, and then use amqsbcg to dump the message for us? It seems as though the reply message isn't making it back to the java classes.... _________________ -wayne |
|
Back to top |
|
 |
mandos_ |
Posted: Sat Nov 18, 2006 1:52 pm Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
Hail!
Here is: The message when I run the program using the first constructor (That connects to the QManager passing only its name)
Code: |
AMQSBCG0 - starts here
**********************
MQOPEN - 'SYSTEM.ADMIN.COMMAND.QUEUE'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 64 MsgType : 1
Expiry : 256 Feedback : 0
Encoding : 273 CodedCharSetId : 437
Format : 'MQADMIN '
Priority : 0 Persistence : 0
MsgId : X'414D5120514D3120202020202020202057765F4520000C03'
CorrelId : X'414D5120514D3120202020202020202057765F4520000C04'
BackoutCount : 0
ReplyToQ : 'AMQ.455F7657020C0020 '
ReplyToQMgr : 'QM1 '
** Identity Context
UserIdentifier : 'dbarboza '
AccountingToken :
X'160105150000008CF443E57FBC2DC7D6E41F0BC704000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '11'
PutApplName : 'C:\WINDOWS\system32\java.exe'
PutDate : '20061118' PutTime : '21132402'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 64 bytes
00000000: 0000 0001 0000 0024 0000 0001 0000 0002 '.......$........'
00000010: 0000 0001 0000 0001 0000 0000 0000 0000 '................'
00000020: 0000 0001 0000 0005 0000 001C 0000 03E9 '...............Θ'
00000030: 0000 0003 0000 001F 0000 0020 0000 07DF '........... ...▀'
No more messages
MQCLOSE
MQDISC |
And the message when I use the constructor that specifies the hostname, port and channel:
Code: |
AMQSBCG0 - starts here
**********************
MQOPEN - 'SYSTEM.ADMIN.COMMAND.QUEUE'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 64 MsgType : 1
Expiry : 253 Feedback : 0
Encoding : 273 CodedCharSetId : 819
Format : 'MQADMIN '
Priority : 0 Persistence : 0
MsgId : X'414D5120514D3120202020202020202057765F4520001103'
CorrelId : X'414D5120514D3120202020202020202057765F4520001104'
BackoutCount : 0
ReplyToQ : 'AMQ.455F765702110020 '
ReplyToQMgr : 'QM1 '
** Identity Context
UserIdentifier : 'dbarboza '
AccountingToken :
X'160105150000008CF443E57FBC2DC7D6E41F0BC704000000000000000000000B'
ApplIdentityData : ' '
** Origin Context
PutApplType : '28'
PutApplName : 'WebSphere MQ Client for Java'
PutDate : '20061118' PutTime : '21170165'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 64 bytes
00000000: 0000 0001 0000 0024 0000 0001 0000 0002 '.......$........'
00000010: 0000 0001 0000 0001 0000 0000 0000 0000 '................'
00000020: 0000 0001 0000 0005 0000 001C 0000 03E9 '...............Θ'
00000030: 0000 0003 0000 001F 0000 0020 0000 07DF '........... ...▀'
No more messages
MQCLOSE
MQDISC |
It seems that haven't none relevant difference...
As I said, my WMQ may be corrupted...
Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Sun Nov 19, 2006 5:51 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Can you look at the AMQ.* reply queue before the pcf class times out? It be good to see if a reply message was sent and if the queue was open at all....
The only interesting diff between the two messages is:
< Expiry : 256 Feedback : 0
< Encoding : 273 CodedCharSetId : 437
---
> Expiry : 253 Feedback : 0
> Encoding : 273 CodedCharSetId : 819
9,10c9,10 _________________ -wayne |
|
Back to top |
|
 |
mandos_ |
Posted: Mon Nov 20, 2006 10:59 am Post subject: |
|
|
Novice
Joined: 17 Nov 2006 Posts: 17
|
The queues AMQ.* are dynamic temporally, then it's so difficult to monitor something...
When I run the sample with the parameters that specifies only the QManager name, the queue AMQ.* "exists" a little more than when I run the sample with the parameters that specifies the hostname port and channel. Then I can see if the amqpcsea process is connected to the queue. But, while the queue exists, only the java process is connected into the AMQ.* queue.
As I said, when I run the sample with the parameters specifying a connection, the queue "exists" only for a little time interval, it's so quickly. |
|
Back to top |
|
 |
|