Search code examples
javaapache-cameljax-rsapache-servicemix

How to get JAX-RS endpoints from multiple Camel contexts under same host/port?


Given the system that has multiple bundles, each having it's own Camel context and zero or more JAX-RS beans (each having a path-prefix defined), how to organise the whole system, so that:

  • all JAX-RS beans are bound to configured hostname/port
  • all of them share same interceptors

I'd like to ask for a little bit verbose answer, please.


Solution

  • It looks you are using CXFSeverlet OSGi transport which is support to routing the request message acrose the bundles. You just need to setup the different relative path to the endpoint.

    You can configure different interceptor per endpoint to handle the request and response different even they are using same transport which you cannot change that.