You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Alessio Soldano <as...@redhat.com> on 2010/09/15 10:56:09 UTC
Programmatic config of features in the Bus
Hi Folks,
looking at the org.apache.cxf.Bus interface, I see there's no way to set
features there. The getFeatures() /
setFeatures(Collection<AbstractFeature> features) methods are only in
the CXFBusImpl implementation. Is there a design reason behind this?
I'm thinking it might be interesting to add the features methods to the
Bus interface, to allow the programmatic approach too for feature
configuration (beside adding them with <cxf:features> in cxf.xml). What
do you think about this? I'd create a jira and most probably work on this.
Cheers
Alessio
--
Alessio Soldano
Web Service Lead, JBoss
Re: Programmatic config of features in the Bus
Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 15 September 2010 8:37:05 am Alessio Soldano wrote:
> On 09/15/2010 10:56 AM, Alessio Soldano wrote:
> > Hi Folks,
> >
> > looking at the org.apache.cxf.Bus interface, I see there's no way to
> > set features there. The getFeatures() /
> > setFeatures(Collection<AbstractFeature> features) methods are only in
> > the CXFBusImpl implementation. Is there a design reason behind this?
>
> Replying to myself... probably because users can just create an instance
> of the desired feature and register that to the bus the other way by
> calling the initialize(..) methods coming in AbstractFeature.
> Sorry for the noise.
To give you a bit of a context:
The features on the bus are only applied when the Bus starts up in it's
postConstruct stuff. Thus, once started, anything added/removed to the
feature list would pretty much be ignored. That's why the methods were not
exposed. Technically, once started, the contents of the list could be
completely discarded.
If we wanted to support a public API for adding features like that, it would
need to actually apply the feature on the add. Not sure what could be done
for a remove.
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Programmatic config of features in the Bus
Posted by Alessio Soldano <as...@redhat.com>.
On 09/15/2010 10:56 AM, Alessio Soldano wrote:
> Hi Folks,
> looking at the org.apache.cxf.Bus interface, I see there's no way to
> set features there. The getFeatures() /
> setFeatures(Collection<AbstractFeature> features) methods are only in
> the CXFBusImpl implementation. Is there a design reason behind this?
Replying to myself... probably because users can just create an instance
of the desired feature and register that to the bus the other way by
calling the initialize(..) methods coming in AbstractFeature.
Sorry for the noise.
Cheers
Alessio
--
Alessio Soldano
Web Service Lead, JBoss