camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ranx <>
Subject Re: CXF cross cutting concerns
Date Wed, 16 Mar 2016 00:39:20 GMT
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


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message