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 IBM MQ Support » MQSeries Design Question

Post new topic  Reply to topic
 MQSeries Design Question « View previous topic :: View next topic » 
Author Message
kairaja
PostPosted: Sat Feb 09, 2002 4:01 pm    Post subject: Reply with quote

Novice

Joined: 08 Feb 2002
Posts: 13

I have a JSP page which would want to place messages on a QMGr on the Application Server box. I wrote a Java Class, MQ.java that takes number of connections as parameter. What it is doing is it calls


connection = new MQQueueManager("QMGR"); for number of connections parameter times and stores then in a hashtable.

JSP page initiates the MQ class and puts in application scope. When user presses a key on JSP page, it will consult the MQ class and grabs the connection from the hashtable. It then uses it to do MQPut call. In this way i am pooling the connection to MQ.

Now is anything wrong with this approach ?

Then it will
Back to top
View user's profile Send private message
kolban
PostPosted: Sat Feb 09, 2002 7:56 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Sounds perfect to me. You have basically implemented your own connection pooling technology. Be aware that MQ provides some assistance for this... see the connection pooling section of the MQ Using Java manual.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Feb 11, 2002 5:27 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

Kolban,
I feel dumb asking this, but can you explain connection pooling please? I keep seeing this term more and more in posts dealing with JAVA and want to make sure I understand it correctly. (For instance, is it only applicable to JAVA?)



_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
mpuetz
PostPosted: Tue Feb 12, 2002 4:05 pm    Post subject: Reply with quote

Centurion

Joined: 05 Jul 2001
Posts: 149
Location: IBM/Central WebSphere Services

Hi,

the concept of a pool of resources is pretty common
in scalable, multi-threaded applications (not just in Java)
Making connections (to e.g. databases,MQ or other servers)
is usually expensive, so want to do that once at startup
and keep them open until the app ends.
If you have multiple threads they would ask the pool coordinator
to give them an unused connection for temporary use. When
they are done they release it to the pool for other threads
to use, but they are never closed until the app shuts down.


_________________
Mathias Puetz

IBM/Central WebSphere Services
WebSphere Business Integration Specialist
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 » General IBM MQ Support » MQSeries Design Question
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.