ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » PCFMessageAgent - SetWaitInterval not working.

Post new topic  Reply to topic
 PCFMessageAgent - SetWaitInterval not working. « View previous topic :: View next topic » 
Author Message
iceage
PostPosted: Wed Mar 14, 2012 2:55 pm    Post subject: PCFMessageAgent - SetWaitInterval not working. Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

Has anybody able to bypass the default 30 second interval for PCFMessageagent in java ? I am trying to specify the interval using SetWaitInterval method , irrespective of the value specified it always defaults to 30 seconds.

Or does it have to be PCFAgent ?

MQ environment : Windows MQ 7016
Back to top
View user's profile Send private message
iceage
PostPosted: Thu Mar 15, 2012 8:10 am    Post subject: Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

Tried with PCFAgent class too , still the same behavior , doesn't honor setWaitInterval values. Can anybody share experience ?

Here is the code snippet for reference ..

Code:
PCFAgent   agent = new PCFAgent ("localhost", 1414, "CLIENT");
      MQMessage []   responses;
      PCFParameter [] parameters =
          {
            new MQCFST (CMQC.MQCA_Q_NAME, "*"),
            new MQCFIN (CMQC.MQIA_Q_TYPE, MQC.MQQT_LOCAL)
          };
      MQCFH     cfh;
      MQCFSL     cfsl;
      agent.setWaitInterval(5000);
      responses = agent.send (CMQCFC.MQCMD_INQUIRE_Q_NAMES, parameters);
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 15, 2012 8:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And it takes you more than 30 seconds to get the results to that query?
What kind of environment are you running?
Any network latency?

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Fri Mar 16, 2012 1:12 am    Post subject: Re: PCFMessageAgent - SetWaitInterval not working. Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

iceage wrote:
Tried with PCFAgent class too, still the same behavior, doesn't honor setWaitInterval values.

What is this "same behavior"? Is it waiting too long, or not long enough?

iceage wrote:
Code:
agent.setWaitInterval(5000);

The PCFAgent.setWaitInterval() value is expressed in seconds, (not milliseconds). 5000 seconds is probably more than enough time to complete most any PCF query.
Back to top
View user's profile Send private message
iceage
PostPosted: Mon Mar 19, 2012 9:24 am    Post subject: Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

Quote:
What is this "same behavior"? Is it waiting too long, or not long enough?


Not long enough , now that it stuck me , its seconds (though it was very explicit in manual , didn't really catch it ..) .. i will attempt a smaller value and see if that's make it work .. For now its NOT waiting 5000 seconds , will update if it waits 100 seconds after testing ..
Back to top
View user's profile Send private message
iceage
PostPosted: Mon Mar 19, 2012 2:02 pm    Post subject: Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

still the same with setWaitInterval(100) , it wouldn't wait 100 seconds will return in 30 seconds (default) .. !!!
Back to top
View user's profile Send private message
JasonE
PostPosted: Tue Mar 20, 2012 5:25 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

So how are you testing this - ie how are you making a PCF response take >30 seconds?

I tried by killing off the command server and saw exactly what you are saying, BUT when I looked in the debugger the problem is that the creation of the PCFAgent object itself connects to the qmgr and does something, and you havent yet set the timeout at that point (you cant!).
Back to top
View user's profile Send private message
iceage
PostPosted: Tue Mar 20, 2012 8:18 pm    Post subject: Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

Yes i do the same , end the command server , execute program to send PCF message and time it when it returns back.

What i also observed is PCF command message is sent always with expiry of 300 seconds

Quote:
BUT when I looked in the debugger the problem is that the creation of the PCFAgent object itself connects to the qmgr and does something, and you havent yet set the timeout at that point (you cant!).


Please clarify this. And would it work for desired wait interval had we not forced timeout condition by stopping command server ?

Many thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » PCFMessageAgent - SetWaitInterval not working.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.