Announcement Announcement Module

JavaConfig forum decommissioned in favor of Core Container

As described at

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:

For any questions related to @Configuration classes and @Bean methods in Spring 3.0, please post in the dedicated 'Core Container' forum at
See more
See less
Registering aliases for a bean with scope prototype Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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 :--
    <bean id="componentDataBuilder"
    	<property name="componentDataConverter" ref="componentDataConverter" />
    <bean class="" parent="componentDataBuilder"	>
            <property name="searchService" ref="searchService" />
    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?

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