cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lewandowski (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2995) Bus configuration ignored if Spring context has default-lazy-init=true
Date Wed, 15 Sep 2010 16:45:33 GMT
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.10, 2.2.9
            Reporter: Adam Lewandowski
            Priority: Minor


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.


Mime
View raw message