camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vivekrao001 <>
Subject Camel SQL Using JNDI and Connecting to Schema other than default Schema
Date Thu, 20 Aug 2015 12:48:34 GMT

I successfully configured sql component using the following config.

       <bean id="sql" class="org.apache.camel.component.sql.SqlComponent">
		<property name="dataSource" ref="dataSource" />
	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
		<property name="driverClassName" value="${jdbc.driverClassName}" />
		<property name="url" value="${jdbc.url}" />
		<property name="username" value="${jdbc.username}" />
		<property name="password" value="${jdbc.password}" />

I was able to do write join queries with tables in different schemas.

But if change it to* JNDI using Tomcat the query is not working.*

<jee:jndi-lookup id="dataSource" jndi-name="jdbc/myds" />

*With JNDI, I was only able to connect to default schema in the table.*

I tried using "sql:" which is bean id for SqlComponent and also using
datasourceRef in the query.

Any help would be greatly appreciated.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message