You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/06/11 08:46:02 UTC

Re: AW: Transactional JMS Route Constantly Opening/Closing Connections

Hi,

You must declare the following bean if you want to use a connection pool factory

    <bean id="pooledConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactoryBean">
        <property name="maxConnections" value="8" />
        <property name="maximumActive" value="500" />
        <property name="transactionManager" ref="transactionManager" />
        <property name="connectionFactory" ref="activemqConnectionFactory" />
        <property name="resourceName" value="activemq.default" />
    </bean>

Next, you can reference it from your ActiveMQComponent bean

KR,

Charles Moulliard

Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel/ServiceMix Committer

*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard



On Thu, Jun 10, 2010 at 8:00 PM, tbarnes <th...@intuit.com> wrote:
>
> Christoph,
>
> Thanks I just tried the ActiveMQ component instead of the JMS Component:
>
> <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>   <property name="connectionFactory" ref="jmsConnectionFactory"/>
>   <property name="transacted" value="true"/>
>   <property name="transactionManager" ref="jmsTransactionManager"/>
> </bean>
>
> and I get the same result.  Next I will try the PoolingConnectionFactory to
> see if the constant connection/disconnections are minimized.
>
> Thanks for your suggestions.
>
> Regards,
> Thomas
>
>
>
> Meise, Christoph wrote:
>>
>> Maybe this helps: http://camel.apache.org/jms.html#JMS-Notes, especially
>> the pooling of connections which is recommended when using Springs
>> JmsTemplate.
>> Regards,
>> Christoph
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Transactional-JMS-Route-Constantly-Opening-Closing-Connections-tp28836324p28846528.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>