Hi All,

I'm using happily the <routeContext /> elements to define routes once and
then use them multiple times.
Well, I actually need to basically use the routes twice:
-  in the tests, with local endpoints and mocks
-  in production, inside karaf, where here are osgi service references I
don't have in tests

Today I needed to use a <dataformats /> but this break my strategy.


I use 3 spring beans xml files, "routes.xml", "test.xml" and "osgi.xml":
- "routes.xml" contains <routeContext/>
- "test.xml" contains a <camelContext/> for development and testing
- "osgi.xml" contains a <camelContext/> for deployment

in tests I run "routes.xml" and "test.xml", while in production I deploy
"routes.xml" and "osgi.xml"

I like this strategy because I change often the camel routes and in this
way I don't have to align the ones in the tests and the one deployed to
karaf.


However <dataformats /> can't be used in <routeContext />, so I have to
define it in the <camelContext />, this mean I have to define a dataformat
in both "test.xml" and "osgi.xml"...

Anyone have an idea on how I can re-use a dataformat defined somewhere
else?
In practice I would like to define the <dataformats> in "routes.xml" or
similar so I don't have to repeat that definition...

Thank you
Cristiano

Reply via email to