You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Adam Lewandowski (JIRA)" <ji...@apache.org> on 2010/09/15 18:45:33 UTC

[jira] Created: (CXF-2995) Bus configuration ignored if Spring context has default-lazy-init=true

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.


[jira] Updated: (CXF-2995) Bus configuration ignored if Spring context has default-lazy-init=true

Posted by "Adam Lewandowski (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Resolved: (CXF-2995) Bus configuration ignored if Spring context has default-lazy-init=true

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2995.
------------------------------

         Assignee: Daniel Kulp
    Fix Version/s: 2.2.11
       Resolution: Fixed


Patch applied.  Thanks!


> 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
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.2.11
>
>         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.