[ http://jira.codehaus.org/browse/XFIRE-297?page=all ]
Dan Diephouse closed XFIRE-297:
-------------------------------
Resolution: Fixed
Fixed in SVN now. Thanks!
> Jsr181HandlerMapping may force spring to create abstract bean
> -------------------------------------------------------------
>
> Key: XFIRE-297
> URL: http://jira.codehaus.org/browse/XFIRE-297
> Project: XFire
> Type: Bug
> Components: Spring
> Versions: 1.0
> Environment: JDK1.4, Spring 1.2.6
> Reporter: Flier Lu
> Assignee: Dan Diephouse
> Priority: Critical
> Fix For: 1.1-beta-1
>
>
> when Jsr181HandlerMapping.processBeans() called, it will iterate all the bean
> in app context
> private void processBeans(ApplicationContext beanFactory,
> AnnotationServiceFactory serviceFactory)
> {
> String[] beanNames = beanFactory.getBeanDefinitionNames();
> // Take any bean name or alias that has a web service annotation
> for (int i = 0; i < beanNames.length; i++)
> {
> if (!beanFactory.isSingleton(beanNames[i])) continue;
>
> Class clazz;
> Object bean;
> try
> {
> clazz = getApplicationContext().getType(beanNames[i]);
> bean = beanFactory.getBean(beanNames[i]);
> but if a abstract bean in context, beanFactory.getBean may force spring
> create abstract bean, and raise a BeanIsAbstractException error.
> org.springframework.beans.factory.BeanIsAbstractException: Error creating
> bean with name 'abstractTxDefinition': Bean definition is abstract
> so we must check the bean definition first, like this
> ConfigurableApplicationContext.getBeanFactory().getBeanDefinition().isAbstract()
> maybe we also need to add a service adapter to process lazy init bean.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira