Willem and Claus
Thanks so much for your help.
I am updating the post with working code.
Kind regards,
Joao

db.properties 
        datasource.stg.url=jdbc:oracle:thin:... 

camel-context.xml 
        ... 
        <bean id="bridgePropertyPlaceholder"
class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
                <property name="location" value="classpath:db.properties"/>
        </bean>

        <bean id="auditDataSourceStg"
class="org.apache.commons.dbcp.BasicDataSource">
                <property name="driverClassName"
value="oracle.jdbc.driver.OracleDriver"/>
                <property name="url" value="${datasource.stg.url}"/>
                <property name="username"
value="${datasource.stg.username}"/>
                <property name="password"
value="${datasource.stg.password}"/>
                <property name="initialSize" value="5" />
                <property name="maxActive" value="10" />
        </bean>
        ... 

MyRouteBuilder.java 
        ... 
            public void configure() { 
                from(fromQueryBuilder) 
                .log("[queryyBuilder] url:{{datasource.stg.url}}") 

Console output 
        2013-11-16 13:20:15,609 [queryBuilder] INFO  route1                     
   
- [queryBuilder] url:jdbc:oracle:thin:... 
        Cannot create JDBC driver of class 'oracle.jdbc.driver.OracleDriver'
for connect URL jdbc:oracle:thin:... 




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-properties-component-not-being-resolved-when-configuring-data-source-tp5743375p5743467.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to