camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Launcelot <>
Subject Usage of properties in datasource definition - Please help
Date Fri, 19 Feb 2016 22:38:23 GMT
I have a property file defined as follows
<camelContext trace="true"
		<propertyPlaceholder id="properties" location=""
propertyPrefix="${" propertySuffix="}"/>
		<route> has a property in it which contains

I have a datasource definition as under
<bean id="myDataSource" class="org.apache.tomcat.jdbc.pool.DataSource">
		<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"
		<property name="url" value="jdbc:oracle:thin:@seq1:1521:sfgd" />
		<property name="username" value="valuesnipped" />
		<property name="password" value="${db.pass}" />
		<property name="maxWait" value="1000" />
		<property name="validationQueryTimeout" value="3" />
		<property name="initialSize" value="8" />
		<property name="maxIdle" value="32" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeout" value="60" />
		<property name="logValidationErrors" value="true" />
		<property name="testWhileIdle" value="true" />
		<property name="testOnBorrow" value="true" />
		<property name="testOnConnect" value="true" />
		<property name="testOnReturn" value="false" />
		<property name="validationQuery" value="/* Oracle Health Check */ SELECT 1

I get exceptions connecting to the database indicating invalid
user/password. I have tried using {{db.pass}} which also does not work,
probably because it is literally assigning the value as {{db.pass}}. If i
just use the actual password above it works fine. The aim is ultimately to
use jasypt but that is a problem for another day.

Any help indicating how I can accomplish setting the password from a
property file is appreciated.


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

View raw message