Announcement Announcement Module
Collapse

JavaConfig forum decommissioned in favor of Core Container

As described at

http://static.springsource.org/sprin...fig/README.TXT

key features of the Spring JavaConfig project have been migrated into the core Spring Framework as of version 3.0.

Please see the Spring 3.0 documentation on @Configuration and @Bean support:

http://static.springsource.org/sprin...tml#beans-java

For any questions related to @Configuration classes and @Bean methods in Spring 3.0, please post in the dedicated 'Core Container' forum at

http://forum.springsource.org/forumdisplay.php?f=26
See more
See less
Registering aliases for a bean with scope prototype Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registering aliases for a bean with scope prototype

    Hi All,

    We are migrating from spring 3.0.M3 to spring 3.0.2. We had a configuration as :--
    Code:
    <bean id="componentDataBuilder"
    	class="mvc.components.DefaultComponentDataBuilder"
    	scope="prototype">
    	<property name="componentDataConverter" ref="componentDataConverter" />
    </bean>
    
    <bean class="example.search.mvc.builders.SearchDataBuilder" parent="componentDataBuilder"	>
            <property name="searchService" ref="searchService" />
        </bean>
    The prototype bean is getting created with the default alias name. We have our own implementation of BeanPostProcessor.postProcessAfterInitialization to register a new alias(dpeneding on our business logic). For a bean with singleton scope 'postProcessAfterInitialization()' is called, but it is not being called for a bean with prototype scope.

    This configuration was working till 3.0.M3 as 'SearchDataBuilder' and we were assuming it to be prototype scope. But with adoption of 3.0.2, we realised that the "SearchDataBuilder" was having singleton scope in previous versions. I can find that this issue is fixed by SPR-3542.

    Do I need to change any of my configuration so that BeanPostProcessor.postProcessAfterInitialization will be called for prototype scope as well?
    Thanks,
    Pranay

  • #2
    it seems i had posted it to the wrong group... i am moving this to Spring Community Forums > Core Spring Projects > Core Container.

    Comment

    Working...
    X