Hi

I've just made an endpoint with jsm using weblogic jndi.
Here is the example:
the jms-setup.xml file is like:

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd";>
        
        <bean id="jndiTemplate"
class="org.springframework.jndi.JndiTemplate">
            <property name="environment">
                <props>
                    <prop
key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                    <prop
key="java.naming.provider.url">t3://serverIP:serverPORT</prop>
                    <prop
key="java.naming.security.principal">username</prop>
                    <prop
key="java.naming.security.credentials">password</prop>
                </props>
            </property>
        </bean>
        
        <bean id="jndiFactoryBean"
class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiName"
value="javax/jms/QueueConnectionFactory"/>
            <property name="jndiTemplate" ref="jndiTemplate"/>
        </bean>

        <bean id="jndiDestinationResolver"
class="org.springframework.jms.support.destination.JndiDestinationResolver">
            <property name="jndiTemplate" ref="jndiTemplate"/>
        </bean>

       <bean id="jmsConfiguration"
class="org.apache.camel.component.jms.JmsConfiguration">
            <property name="connectionFactory" ref="jndiFactoryBean"/>
            <property name="destinationResolver"
ref="jndiDestinationResolver"/>
        </bean>

        <bean id="jmsPublisher"
class="org.apache.camel.component.jms.JmsComponent">
               <property name="configuration" ref="jmsConfiguration" />
        </bean>
        
</beans>

in camel-context.xml we add:

<to uri="jmsPublisher:queue:dbus/jms/queue/QUEUE_NAME"/>

I hope it will be helpful.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-jsm-via-jndi-example-tp5751623.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to