BTW a side point - by default Camel uses the CACHE_CONNECTION level with the MessageListenerContainer due to this spring bug...
http://www.nabble.com/please-vote-for-SPR-3890-to-improve-Camel%27s-JMS-support-for-both-JMS-transactions-and-efficiency-tf4626284s22882.html#a13210354 This unfortunately causes sessions and consumers to be created, used for one message and then stopped again (which typically causes a new thread to be created for the consumption of the message then its closed again). You can switch to using CACHE_CONSUMER which should help - it'll then reuse the same threads/sessions/consumers. The downside though is that due to the Spring bug mentioned above, you can't consume from JMS and send to another JMS destination in a single JMS transaction. On 12/11/2007, James Strachan <[EMAIL PROTECTED]> wrote: > On 12/11/2007, oliT <[EMAIL PROTECTED]> wrote: > > > > Hi and thank you for your quick reply! > > > > > > James.Strachan wrote: > > > > > > Just to be a pedant; its Spring's MessageListenerContainer which keeps > > > adding/removing JMS consumers :)... > > > > > I am sorry for beeing unclear. I know its springs fault =). > > > > > > James.Strachan wrote: > > > > > > I'm a bit confused how you are creating Camel and running the routes? > > > > > We are not using the xbean style to configure camel, > > BTW Camel doesn't use XBean - its pure Spring 2 stuff... > > > > > so thats how we set up > > the camel context: > > <bean id="camel" class="org.apache.camel.spring.SpringCamelContext" /> > > <bean id="camelEndpointFactory" class="....CamelEndpointFactory" /> > > <bean class="org.apache.camel.spring.CamelBeanPostProcessor"> > > > > <property name="camelContext" ref="camel" /> > > </bean> > > Hmm - I still don't quite understand what your application is actually > doing - e.g. I don't know what the Routes stuff does or the TestBean > etc. > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source SOA > http://open.iona.com > -- James ------- http://macstrac.blogspot.com/ Open Source SOA http://open.iona.com
