camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vegi, Vamsi (MAN-Corporate-CON)" <Vamsi.V...@Manheim.com>
Subject BridgePropertyPlaceholderConfigurer, could not get the properties, I searched the user forum but could not get the answer
Date Wed, 22 May 2013 04:22:41 GMT
Hello
Can anyone provide some input:

I am trying to access the properties defined in camel.properties file, but I cannot access
it,
See below for details


In my XML I have

<bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
                <property name="locations">
                                <list>
                                                <value>classpath:camel.properties</value>
                                </list>
                </property>
</bean>

<camelContext id="ovc-inbound-jms-camel-app" xmlns="http://camel.apache.org/schema/spring">
                <routeBuilder ref="companyMsgRouter" />
                <routeBuilder ref="repMsgRouter" />
                <routeBuilder ref="customerGrpMsgRouter" />
                <routeBuilder ref="relCustGrp2CompanyMsgRouter" />
</camelContext>
=====================================================
In my code, I have


public class CompanyMsgRouter  extends RouteBuilder{
// some variables here

@Override
                public void configure() throws Exception {
                                LOG.info("CompanyMsgRouter: configure called");
                // some routes here
                System.out.println("camel context ready: " + getContext().getProperty("sayHi")
);  // =======> Does not work, I get a null value
                } // end configure

} // end class

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message