geronimo-xbean-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alex322 (JIRA)" <j...@apache.org>
Subject [jira] Updated: (XBEAN-97) default-lazy-init is ignored
Date Fri, 19 Oct 2007 12:49:50 GMT

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


Mime
View raw message