Hi You can use spring property placeholders in endpoints if you define them as <endpoint>
See this FAQ: http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html And go vote for the SPR ticket so we can have it improved in the future http://jira.springframework.org/browse/SPR-4466 On Sat, Sep 5, 2009 at 8:57 AM, snowbug<[email protected]> wrote: > > Hi, > > I would like to use regular spring bean definition style (<bean> tag) rather > than the more expressive <camelContext> style to define my camel context > bean. Is it doable? > > The reason: > - I'd like to be able to let the camel bean "depends-on" another bean I > defined to control the orders of the initialization for a couple of critical > beans > - I'd like to use Spring's PropertyPlaceholderConfigure to externalize some > properties that need to be changed by the client engineer, and one of these > variables would be the packageScan of the camel context, as I'd like to > allow the client engineer to add their packages to be scanned by updating > the properties file. At present, the document says that Camel does not > support the Spring PropertyPlaceholderConfigure yet. > > So after examining the CamelContextFactoryBean, I've tried something like > this: > <bean id="camel" > class="org.apache.camel.spring.CamelContextFactoryBean"> > <property name="trace" value="false" /> > <property name="packageScan"> > <bean class="org.apache.camel.model.PackageScanDefinition"> > <property name="packages"></property> > </bean> > </property> > </bean> > > It won't work because the "packageScan" takes a "PackageScanDefinition" > class, which has a private List property "packages" that does not have a > public setter, so I have no way to initialize it. > > Another thing is that I don't know how to create a template inside the > context... should it be created as a separate Spring bean? > > Thanks, > > > Alan > -- > View this message in context: > http://www.nabble.com/Use-regular-spring-bean-definition-style-rather-than-xbean-camelContext-style-tp25305561p25305561.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
