camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Re: AW: Transactional JMS Route Constantly Opening/Closing Connections
Date Fri, 11 Jun 2010 06:46:02 GMT
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 <thomas_barnes@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.
>
>

Mime
View raw message