[ https://issues.apache.org/jira/browse/CXF-2995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Lewandowski updated CXF-2995: ---------------------------------- Attachment: force-eager-init.patch Patch including a test case and fix > Bus configuration ignored if Spring context has default-lazy-init=true > ---------------------------------------------------------------------- > > Key: CXF-2995 > URL: https://issues.apache.org/jira/browse/CXF-2995 > Project: CXF > Issue Type: Bug > Components: Configuration, Core > Affects Versions: 2.2.9, 2.2.10 > Reporter: Adam Lewandowski > Priority: Minor > Attachments: force-eager-init.patch > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.