I have an OSGi bundle (deployed into Karaf 2.2.4) that starts a Camel (2.10.0) context. The Camel context's routebuilder has some xquery endpoint URIs such as
"xquery:classpath:Dir1/Dir2/example.xq"
When the context tried to resolve that URI, it failed since the Camel bundle is not in the same classpath as where the .xq file resides. So, I created a url expand function that turns
"xquery:classpath:..."
into
"xquery:bundle://42.0:6/..."
since I had dealt with bundle URIs and the OsgiBundleResourcePatternResolver
earlier in my project when dealing with a ClassPathScanningCandidateComponentProvider
(Spring 3.1.1). Unfortunately, I can't seem to find a way to make Camel's XQueryComponent
use my OsgiBundleResourcePatternResolver
.
- Am I going about this the right way? Is there an easier way to do this?
- If I am, how can I make sure the
XQueryComponent
can understand abundle:
URI? - Also, is it possible for me to make sure any camel component can understand a
bundle:
URI?