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.