I'll either go with DOSGi or stick with my current mechanism using an OSGi whiteboard and will leave the CXF bus alone for now.
I haven't had enough time to evaluate DOSGi yet so can't comment on its suitability for my use but using the registration listener mechanism works well since it lets me deploy and uninstall bundles and have the web services just autodiscover and deploy themselves. I'll likely add add methods to my registration event that let me override, exclude or add interceptors, handlers, etc. in the future. For example, one of the REST endpoint clients was insistent that we drop root on all the REST resources. Another wanted the full namespacing of badgerfish in their JSON. I'd be able to specify those as additions to the new endpoint to be used along with whatever standard interceptors, providers, features and handlers were specified by default. But they'd only be applied to the particular endpoint being created for the bundle that is being installed and wouldn't be globally applicable. I'm still thinking about how I might approach the problem since it is something of a set. Obviously it is very easy to add new interceptors to those already specified as defaults. Excluding interceptors would require a meaningful way of identifying them. Perhaps just class or interface name would be sufficient. When a new endpoint is set up on receipt of a registration event the default interceptors, handlers, etc. would be put in a map and then any specified exclusions could remove the undesirable ones. Then any additions could be put in the map. At that point the JAX WS and JAX RS server factories could be started and these objects can be injected. For the most part one wouldn't change the default settings but there's always the edge case(s). I just want to make sure I don't start over-engineering something that should be very simple to use. But permitting overrides and exclusions should be relatively simple to add and fairly powerful. As long as Maven and bundle classloaders behave themselves nicely and that should be the case. Brad -- View this message in context: http://camel.465427.n5.nabble.com/CXF-cross-cutting-concerns-tp5778798p5779128.html Sent from the Camel - Users mailing list archive at Nabble.com.
