James Strachan schrieb:
2008/12/10 Christian Schneider <[EMAIL PROTECTED]>:
Hi James,
Anurag tried to use the JMSComponent with the spring
SingleConnectionFactory. This should ensure that only one connection is
used.
But it still creates a brand new Session and then either a Producer or
Consumer - then closes them all down for every single message.
According to the JMS spec a session is a short lived object that should
not cause any harm when being created every time. I don“t know about a
producer though.
For the consumer part I have written a quite efficient solution for the
Apache cxf jms transport. It uses a DefaultMessageListenerContainer. So
the consumer is created only once.
Perhaps this can also be done for Camel. On the producer side I had no
such solution though. I did some load tests with the cxf implementation
and had no problems with ActiveMQ.
All in all I think it is not so good that camel uses a special component
for ActiveMQ as the problem is existent for every jms provider and
should be solved in a general way.
Greetings
Christian
So I would not expect that such an error should happen. In any case I fear
that this problem could also happen with other jms providers that
do not have a special module in Camel.
When using JMS you should always be careful about pooling to avoid
using it very inefficiently.
--
Christian Schneider
---
http://www.liquid-reality.de