You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jacobnebu <ja...@hotmail.com> on 2016/01/24 21:30:39 UTC
Camel route for connecting to TIBCO EMS throgh JNDI
(connectionFactory have username and password)
Hi
I am unable to connect to tibco ems. I am getting the below exception
javax.naming.AuthenticationException: Not permitted: invalid name or
password.
i am using below configuration to get ConnectionFactory from JNDI and , then
getting connection from ConnectionFactory. When normal jms code I can pass
username and password to connectionFactory.getConnection(username,password)
and gets back connection successfully. But through below spring definition I
am unable to get connection.
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop
key="java.naming.factory.initial">${jndi.intial.context}</prop>
<prop
key="java.naming.provider.url">${jndi.naming.provider.url}</prop>
<prop
key="java.naming.security.principal">${jndi.naming.security.principal}</prop>
<prop
key="java.naming.security.credentials">${jndi.naming.security.credentials}</prop>
</props>
</property>
</bean>
<bean id="jndiFactoryBean"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="${connectionFactory.name}"/>
<property name="jndiTemplate" ref="jndiTemplate"/>
</bean>
<bean id="proxyConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory" ref="jndiFactoryBean"/>
<property name="username"
value="${jndi.naming.security.principal}"/>
<property name="password"
value="${jndi.naming.security.credentials}"/>
</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="proxyConnectionFactory"/>
<property name="destinationResolver" ref="jndiDestinationResolver"/>
</bean>
<bean id="JmsTibco" class="org.apache.camel.component.jms.JmsComponent">
<property name="configuration" ref="jmsConfiguration" />
</bean>
<from uri="JmsTibco:queue:sampleQueue" />
....
Can you please help me to fix this isssue.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-route-for-connecting-to-TIBCO-EMS-throgh-JNDI-connectionFactory-have-username-and-password-tp5776633.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel route for connecting to TIBCO EMS throgh JNDI
(connectionFactory have username and password)
Posted by jacobnebu <ja...@hotmail.com>.
This code is good. My password was wrong.
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-route-for-connecting-to-TIBCO-EMS-throgh-JNDI-connectionFactory-have-username-and-password-tp5776633p5777167.html
Sent from the Camel - Users mailing list archive at Nabble.com.