cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <>
Subject RE: Injecting the configuration programmatically
Date Fri, 15 Dec 2006 13:43:06 GMT

> How to register a custom implementation with the bus ?
> Thanks, Sergey

After you call SpringBusFactory.createBus(...) to create the Bus, use
Bus.setExtension(myConfiurer, Configurer.class) to register your custom
implmentation. The setExtension() API simply put()s into a Map keyed on
Class, so your custom configurer will just overwrite the standard one
previously registered by createBus().

One caveat though ... make sure your Configurer is registered *before*
your app does anything that would require the particular Bean with
programmatically injected properties to be instantiated. For example,
suppose the Bean in question was the HTTPListenerConfigBean ...
obviously your configurer will have to available when the first Listener
is launched, e.g. before the first call to Endpoint.publish() [assuming
the JAX-WS model].


View raw message