[ 
https://issues.apache.org/jira/browse/XBEAN-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

alex322 updated XBEAN-97:
-------------------------

    Component/s: spring

> default-lazy-init is ignored
> ----------------------------
>
>                 Key: XBEAN-97
>                 URL: https://issues.apache.org/jira/browse/XBEAN-97
>             Project: XBean
>          Issue Type: Bug
>          Components: spring
>            Reporter: alex322
>
> lazyInit is always false.
> Adding this snippet to 
> org.apache.xbean.spring.context.v2c.XBeanNamespaceHandler.parseBeanFromExtensionElement
>  should solve the problem :
>                       BeanDefinition def = result.getBeanDefinition();
>                       if (def instanceof AbstractBeanDefinition) {
>                               AbstractBeanDefinition adef = 
> (AbstractBeanDefinition) def;
>                               if 
> (!element.hasAttribute(BeanDefinitionParserDelegate.LAZY_INIT_ATTRIBUTE)) {
>                                       
> adef.setLazyInit(parserContext.isDefaultLazyInit());    
>                               }                               
>                       }
> Also checking for top-level bean definition can be simplified:
> if (!parserContext.isNested())

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to