Posted: Mon Jan 06, 2003 12:01 pm Post subject: PCFMessageAgent Query
Novice
Joined: 17 Jun 2002 Posts: 20 Location: Sydney
Hi
I had some question on the PCFMessageAgent in PCF classes for Java.
The scenario:
In the assignement I am doing I need to query/INQUIRE the queue/process in some order like I INQUIRE_QUEUE the queue first and from there get the PROCESS NAME and then based on process name
do the INQUIRE_PROCESS. After that I invoke RESET Q STATS on the queue.
This can be done for multiple queues so I have created separate methods
called inquireQueue(), inquireProcess() and resetQueueStats() all being called from a main method
Right Now:
From main method, I am passing QM connection[MQQueueManager] to each method and doing a
Code:
PCFMessageAgent pcfMesgAgent = new PCFMessageAgent (_queueManager);
pcfMesgAgent.disconnect();
This can be called multiple times. Is it a good idea to keep doing that ina method like getting a new Agent and dicsonnecting
everytime you need something by PCF query
How about the alternate Option:
I do the following in main method
Code:
PCFMessageAgent pcfMesgAgent = new PCFMessageAgent (_queueManager);
and keep passing the PCFMessageAgent Object to every method and use the agent inside the each method for every PCF request call.
and IN Main method, after all invokations to the methods In the end do the following
Code:
pcfMesgAgent.disconnect();
Let me know if you can help me. Any advice /help will be appreciated
Thanks in advance
Arun _________________ In Celebration of Being Alive !!!
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