activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: jencks or spring 2.0
Date Thu, 27 Jul 2006 15:27:23 GMT
On 7/27/06, Paul French <> 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.

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.



View raw message