On 7/27/06, James Strachan <[EMAIL PROTECTED]> wrote:
On 7/27/06, Paul French <[EMAIL PROTECTED]> wrote: > > Thanks James, Judging from the mailing lists you are a very busy man!! > > I think you misunderstood my question? > > Does Jencks pool sessions OR connections when using JMS? It pools both > Using Spring SingleConnectionFactory we reuse the same connection. However > Spring will create a new session and consumer/producer on the fly when using > the JmsTemplate. Hence my question: > > > Is a new session object fairly lightweight? (from the point of view of > creating it) Not in term of latency as it requires a blocking request-response with a broker. Ditto when creating/closing producers/consumers.
Actually, creating/closing a session and producer uses async one way messages. So, latencey should not be an issue unless you are bandwith constrained. But creating/closing consumers does use a blocking RPC. So even using SingleConnectionFactory with JmsTemplate to send 1
message will require 4 request responses purely for the session & producer - then another one to send the message (if you are not using async sends). Async sending can't really help avoid the 4 blocking request-responses that JmsTemplate introduces. > Hence using Jencks would you not still have to create a producer/consumer on > the fly for each of your working threads? Jencks pools them. -- James ------- http://radio.weblogs.com/0112098/
-- Regards, Hiram Blog: http://hiramchirino.com
