camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: JMS error after 3922 invokations (Spring-JMS)
Date Wed, 10 Dec 2008 20:30:36 GMT
James Strachan schrieb:
> 2008/12/10 Christian Schneider <>:
>> 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.



>> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message