In spring :
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="jmsConnectionPool"/>
</bean>
<camel-osgi:camelContext xmlns="http://camel.apache.org/schema/spring"
id="asyncGDSPojo">
<endpoint id="gdsProcessorQueue"
uri="jms:queue:${gds.processorQueue}?concurrentConsumers=${gds.numberConcurrentConsumers}"/>
<route>
<from ref="gdsProcessorQueue"/>
<to uri="gdsPojoWrapper"/>
</route>
</camel-osgi:camelContext>
<osgi:reference id="jmsConnectionPool" interface="javax.jms.ConnectionFactory"
filter="(wcsri.client=true)"/>
In aries blueprint as of camel 2.6 (2.7 is slated for release)
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="jmsConnectionPool"/>
<property name="concurrentConsumers"
value="${gds.numberConcurrentConsumers}"/>
</bean>
<camelContext id="asyncGDSPojo"
xmlns="http://camel.apache.org/schema/blueprint">
<!-- Need to fix the hardcoded value here this is fixed/available in Camel
2.7 and onwards.-->
<endpoint id="gdsProcessorQueue" uri="jms:queue:gds.processor"/>
<route>
<from ref="gdsProcessorQueue"/>
<to uri="gdsPojoWrapper"/>
</route>
</camelContext>
<reference id="jmsConnectionPool" interface="javax.jms.ConnectionFactory"
filter="(wcsri.client=true)"/>
On Mar 15, 2011, at 9:43 AM, Michael Dewitte wrote:
> Thanks, but I was not able to find any pointer on how to use the connection
> pool from camel... samples from Camel tell you how to setup the connection
> to an ActiveMQ instance, but I haven't found how to use the pool available
> from osgi to the local broker instance...
>
> Can I directly use (as read in the new 4.3.0-snapshot documentation -
> http://servicemix.apache.org/docs/4.3.0-SNAPSHOT/quickstart/activemq.html)
> the following in a camelContext, as a route definition :
>
> *
>
> <route>
> <from uri="activemq://events"/>
> <to uri="log:events"/>
> </route>
>
> *
>
>
> and that would make use of the connexion factory you mentioned to the local
> broker instance ? Would you have any pointer to the config I can manage for
> the pool ?
>
> Sorry if the question can seem basic, but finding his way as a newbie is not
> always easy...
>
> Mike
>
>
> 2011/3/15 Johan Edstrom <[email protected]>
>
>> You have a broker started by default, you also have a connection pool
>> available
>> as a default via the osgi registry.
>>
>> To use camel, you can use the feature camel-jms / camel-activemq,
>> and that'll give you all the workings necessary for working with JMS
>>
>> Then just follow the examples in camel-jms.
>>
>> /je
>>
>> On Mar 15, 2011, at 9:17 AM, Michael Dewitte wrote:
>>
>>> Hi,
>>>
>>> still trying to find my way in some aspects of ServiceMix...
>>>
>>> ActiveMQ is installed when installing a ServiceMix instance. What do I
>> have
>>> to do if I want to have a JMS IN endPoint (I want to facade a service
>> with
>>> JMS) ?
>>>
>>> Do I have to install another ActiveMQ instance or do I reuse the existing
>>> one ? Do I have to use Camel ActiveMQ component or is it another
>> possibility
>>> (and what would be the prefered one in different cases ?)
>>>
>>> I know there's also the JBI component, but since it's not developped
>>> furthermore in favor of the Camel components, I assume it wouldn't be a
>> very
>>> good idea to start new developments based on it...
>>>
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>> http://servicemix.396122.n5.nabble.com/JMS-ActiveMQ-transport-tp3706931p3706931.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>