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 » Weblogic + MQ(JMS) connection pooling

Post new topic  Reply to topic
 Weblogic + MQ(JMS) connection pooling « View previous topic :: View next topic » 
Author Message
archit_agarwal
PostPosted: Wed Feb 21, 2007 8:02 am    Post subject: Weblogic + MQ(JMS) connection pooling Reply with quote

Novice

Joined: 14 Jan 2006
Posts: 16

Hi All,
I am working on configuring IBM WebSphere MQ(JMS) on weblogic to integrate with.
I used Foreign JMS Server to configure the Jndi in Weblogic.
It is working fine. But it is too slow as compared to writing a simple program using MQ (by specifying q mgr, q, channel,port).
I tried to make the singleton class for Jndi lookup. But it fails after running the application runs on 300 threads.
It seems as if the sessions are not getting closed and there could be only 100 concurrent connections open on a single port.

Now I was thinking to implement some kind of connection/session pooling, so that I can make way to hold the request, if currently it is not available in the thread.
Does any body have an idea of connection pooling in MQ(JMS). I know MQ internally has some sort of connection pooling which we can play with using MQEnvironment, but here I am just trying to avoid any such very much specific MQ classes to be used.
Please help.

Thanks,
Archit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Wed Feb 21, 2007 8:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Your application server should provide any needed connection pooling.

Doing the lookup in a singleton is a horrible idea from a J2EE/JavaEnterprise perspective.

JMS is always going to be slow compared to the Java API for WebSphere MQ.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
archit_agarwal
PostPosted: Wed Feb 21, 2007 9:59 am    Post subject: Reply with quote

Novice

Joined: 14 Jan 2006
Posts: 16

Weblogic Application server provides no way of pooling MQ (JMS) connections directly.
I require this while sending messages. Weblogic provides a mechanism for Session pools which could be useful while receiving messages not while sending messages.
Also, I didn't understand that why would you said that context looking in singleton is a horrible idea, though it makes the things faster, as seperate threads need not to look for the initial context everytime. And hence I can save InitialContext look-up everytime.
I tried to keep the context into the hashMap as well, but that would only utilize during the multiple look-ups in the same thread.

Even I am using JMS api using ConnectionFactory/Connection/session but by specifying the q mgr, q, channel,port instead of JNDI lookup for these everytime.

Any suggestion will be of great help.

Thanks,
Archit
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Wed Feb 21, 2007 10:06 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I don't think the InitialContext is going to be the same across all threads, particularly it may be different in a Servlet than an EJB.

I think it's likely a performance optimization that is unnecessary in almost all cases.

I believe that the JMS specification requires that an application server provide connection pooling capabilities.

Weblogic may have decided that only applied to it's messaging provider, rather than foreign providers.

You may find some useful information here:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaw.doc/jms77afs.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
archit_agarwal
PostPosted: Wed Feb 21, 2007 1:53 pm    Post subject: Reply with quote

Novice

Joined: 14 Jan 2006
Posts: 16

Thanks Jeff!

but we are usig MQ version 5.3 and therefore I am not sure if I can use these properties.
Do you have an idea if these ASF classes/functions can still be used.

Yes it is more to do with performance optimization.

We used even servlet calls to find out if that also performs better.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Wed Feb 21, 2007 1:54 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The v5.3 version of the Using Java manual is
http://www-306.ibm.com/software/integration/wmq/library/library53.html
_________________
I am *not* the model of the modern major general.
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 » Weblogic + MQ(JMS) connection pooling
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.