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 » General Discussion » Pooling connection to Queues

Post new topic  Reply to topic
 Pooling connection to Queues « View previous topic :: View next topic » 
Author Message
mq_tyro
PostPosted: Sun Feb 01, 2004 3:34 pm    Post subject: Pooling connection to Queues Reply with quote

Novice

Joined: 10 Jul 2002
Posts: 19
Location: Mumbai

Hi,

In out application we are using MQ Java Client to connect to Q-Manager.
We were wondering if we can create a pool of conections to Queue of the Q-Maager.

Meaning the pool woud be a collection of "MQQueue" java objects.

Using any of these java objects can we put the message in the queue ?

Thanks a lot.
_________________
IBM Certified MQSeries Specialist
Back to top
View user's profile Send private message Yahoo Messenger
saju
PostPosted: Mon Feb 02, 2004 11:39 am    Post subject: Re: Pooling connection to Queues Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 9
Location: India

Yes!

It will work. You can put message to a queue using the connection pool (Queue manager object). Only thing to be noted is to get connected to the queue each time before you try putting message to it. Also do this entire operation in a "try - catch" block.

It really works for my application.

- Saju
_________________
Dreams get you into the future and add excitement to the present...
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mq_tyro
PostPosted: Mon Feb 02, 2004 10:41 pm    Post subject: Reply with quote

Novice

Joined: 10 Jul 2002
Posts: 19
Location: Mumbai

Hi Saju,

Thanks for the informatoion.

I was wondering if the we can pool the connection handles to the Queue and not the Q-Managers. That way everytime I put a message in a Queue, I can use the same connection handle to queue.

Please let me know

Thanks a lot.
_________________
IBM Certified MQSeries Specialist
Back to top
View user's profile Send private message Yahoo Messenger
saju
PostPosted: Tue Feb 03, 2004 1:02 am    Post subject: Reply with quote

Newbie

Joined: 02 Feb 2004
Posts: 9
Location: India

If you are using Java, you can perhaps store the connection objects in a HashMap or Arraylist. When you want to put the message to a queue belonging to a queue manager, establish connection with that queue using the Connection object of the Queue manager of that queue. Then put the message and close the queue.

Step 1: Store Queue manager connection objects in a HashMap or ArrayList.

Step 2: Using the connection object of Queue manager, get connected to the queue.

Step 3: Put / Get message to/from the queue.

Step 4: Close connectiong to the queue.

This is working for my application...so you can also get your desired result.

- Saju
_________________
Dreams get you into the future and add excitement to the present...
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mq_tyro
PostPosted: Tue Feb 03, 2004 9:16 am    Post subject: Reply with quote

Novice

Joined: 10 Jul 2002
Posts: 19
Location: Mumbai

Thanks buddy.

Appriciate your help.
_________________
IBM Certified MQSeries Specialist
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Pooling connection to Queues
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.