You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jeffrey Knight <je...@gmail.com> on 2011/09/20 17:03:14 UTC

Re: Configuring CXF with JMS using a JNDI resource

Jeffrey Knight <je...@...> writes:
> 
> I'm still drawing a blank on the JNDI config for JMS.
> 
> Can anyone who's successfully configured CXF with JMS transport,
> referencing a message queue defined as a (WebSphere)
> JNDI resource
> point me in the right direction?
> 
> Thanks,
> Jeff
> 

Just in case anyone is looking for this in the future, here's the config for CXF
+ JMS via JNDI

<jee:jndi-lookup id="myTargetConnectionFactory" 
            jndi-name="${mq.jndi-name}"/>
<bean id="jmsDestResolver"
class="org.springframework.jms.support.destination
          .JndiDestinationResolver"/>

<bean id="myConnectionFactory"
class="org.springframework.jms.connection
            .UserCredentialsConnectionFactoryAdapter">
    <property name="targetConnectionFactory" 
              ref="myTargetConnectionFactory"/>
    <property name="username" value="${mq.username}"/>
    <property name="password" value=""/>
</bean>

<bean id="jmsConfig" class="org.apache.camel.component.jms
          .JmsConfiguration">
    <property name="connectionFactory" ref="myConnectionFactory" />
    <property name="destinationResolver" ref="jmsDestResolver" />
    <property name="concurrentConsumers" value="1" />
    <property name="maxConcurrentConsumers" value="10" />
    <property name="cacheLevelName" value="CACHE_NONE" />
</bean>