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 » Caching Queue Manager

Post new topic  Reply to topic
 Caching Queue Manager « View previous topic :: View next topic » 
Author Message
bvasanth
PostPosted: Thu Aug 26, 2004 2:04 am    Post subject: Caching Queue Manager Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

Hi,
I am developing a J2EE based web application using MQ as key back-end part. When user does some action, I open MQQueueManager, the request, reply queues, and finally disconnect/closes them all. The opening of MQQueueManager takes lot of time (about 3-7 seconds) as I connect to remote machine.
Is it okay to open one queuemanager and keep in application-wide memory (caching), and use the same queue manager for all usre requests? Or should I always open and disconnect a queue manager for every request and it should not be shared?


Thanks
Vasanth
Back to top
View user's profile Send private message
PGoodhart
PostPosted: Thu Aug 26, 2004 4:20 am    Post subject: Reply with quote

Master

Joined: 17 Jun 2004
Posts: 278
Location: Harrisburg PA

It is generally smart to implement a connection pool in Java. You may be able to find a sample program that implements this if you look. You will never be able to get rid of 3-7 second time it takes to connect so you should reuse the connection.
_________________
Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 26, 2004 4:51 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you're really developing a J2EE web application, you should strongly consider using JMS instead of the base Java MQ API.

Then you will not have to worry about connection pooling, as your app server will handle it for you.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Tibor
PostPosted: Mon Aug 30, 2004 2:55 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

jefflowrey wrote:
If you're really developing a J2EE web application, you should strongly consider using JMS instead of the base Java MQ API.

Then you will not have to worry about connection pooling, as your app server will handle it for you.


topic off
Jeff,

There is other advantages for using JMS? The number of Java apps is growing in our environment and we should have to decide about supporting JMS.


Thanks,

Tibor
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 30, 2004 5:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

JMS is part of the J2EE specification.

There are advantages and disadvantages to using it. One of the main disadvantages of using it is that it is slower (particularly using Message Driven Beans) than the plain MQ API. One of the main advantages to it is that it is somewhat simpler to code than the plain Java MQ API. It also takes much less code to handle transactions and connection pools - because the j2ee container is supposed to handle those for you (part of the reason it's slow).

But again, it is part of the J2EE specification and the plain Java MQ API is not.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Tibor
PostPosted: Mon Aug 30, 2004 5:43 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

thanks all Jeff
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 » Caching Queue Manager
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.