camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob G." <aerost...@hotmail.com>
Subject How camel resolve JNDI End point
Date Thu, 04 Oct 2007 12:58:04 GMT

Hello 

I am trying to configure Camel to use JMS end point into Websphere 6.1
(was). My end point cannot be found because of some Spring JNDI lookup
problem. 

Some question :
-  How do I tell Camel to use my Spring JndiTemplate or
JndiDestinationResolver so that my jms queue will be resolved properly?

In the documentation, it says that Camel uses Spring JmsTemplate. How can I
tell Camel to use my JmsTemplate configured for Websphere?

There is my config: 

<beans>
	<bean id="camel" class="org.apache.camel.spring.CamelContextFactoryBean">
		<property name="packages" value="com.abc.poc.camel.jms"/> 
	</bean>


	 <!-- ?? My JmsTemplate is not injected or Used in any Camel Classes ?? -->
	<bean id="jmsQueueTemplate"        
class="org.springframework.jms.core.JmsTemplate">
	  <property name="connectionFactory"
ref="internalJmsQueueConnectionFactory"/>   
	  <property name="destinationResolver" ref="jmsDestinationResolver"/>
	  <property name="pubSubDomain"> <value>false</value>  </property>
	  <property name="receiveTimeout"> <value>20000</value> </property>
	</bean>

    <!-- JMS Destination Resolver -->
    <bean id="jmsDestinationResolver"     
class="org.springframework.jms.support.destination.JndiDestinationResolver">
        <property name="jndiTemplate" ref="jndiTemplate"/>
        <property name="cache" value="true"/>
    </bean>

  <!-- JMS Queue Connection Factory -->
  <bean id="internalJmsQueueConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">  
	<property name="jndiTemplate" ref="jndiTemplate"/>
    <property name="jndiName"> <value>jms/myConFactory</value>  </property>
  </bean>
  
  <bean id="jndiTemplate"		class="org.springframework.jndi.JndiTemplate">
		<property name="environment">
			<props><prop key="java.naming.factory.initial">
					com.ibm.websphere.naming.WsnInitialContextFactory
				</prop>
			</props>
		</property>
	</bean>
</beans>


Thank you. 


-- 
View this message in context: http://www.nabble.com/How-camel-resolve-JNDI-End-point-tf4568653s22882.html#a13039322
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message