Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.9, 2.2.10
-
None
-
Novice
Description
Bus configuration using the Spring namespace handler is ignored if the containing context defaults to lazy-init (default-lazy-init=true). The configuration bean definition (BusDefinitionParser$BusConfig) created by BusDefinitionParser inherits this setting. Since the bean is never explicitly referenced it does not get instantiated which would trigger the setApplicationContext method, registering the configured bus under the 'cxf' bean name. Instead, you get a bus with the default configuration.
As a workaround, you can set the containing context to eager-init, but this is not feasible in many cases.
I've attached a patch which includes a test case and fix in BusDefinitionParser to force the config bean to be eager-init.
I've read a few places that Daniel Kulp mentions most CXF beans will be lazy-init in 2.3, perhaps this will be addressed then. In the meantime, this patch is working for me.