You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-dev@geronimo.apache.org by "alex322 (JIRA)" <ji...@apache.org> on 2007/10/19 14:49:50 UTC

[jira] Updated: (XBEAN-97) default-lazy-init is ignored

     [ 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.