|
From: Kopylenko, D. <dko...@ac...> - 2004-03-03 21:49:17
|
Nope, this is exactly what the BeanFactoryPostProcessor is all about - no
bean instances has been created yet, but all RootBeanDefinitions has been
"prepared".
What do you mean it's still too early?
-----Original Message-----
From: James Cook [mailto:jim...@do...]
Sent: Wednesday, March 03, 2004 4:29 PM
To: spr...@li...
Subject: RE: RE: [Springframework-developer] Lifecycle methods
Well, the getBean("") call is done by the BeanFactory because these are
singleton beans. After the bean in instanced is when the
postProcessBeanFactory() method is invoked.
Even then, it is still too early. I think we need an interface that any bean
can implement that fires after the BeanFactory completes its configuration.
Something like:
public interface postBeanFactoryConfigure {
void postConfigureBeanFactory(BeanFactory beanFactory);
}
> -----Original Message-----
> From: spr...@li...
> [mailto:spr...@li...] On
> Behalf Of Kopylenko, Dmitry
> Sent: Wednesday, March 03, 2004 3:44 PM
> To: 'spr...@li...'
> Subject: RE: RE: [Springframework-developer] Lifecycle methods
>
> I would think by doing something like this:
>
> postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
> beanFactory.getBean("beanName");
> }
>
> it would instantiate the bean, if not done so already and call its
> lifecycle callbacks
>
> Juergen, can you confirm, please.
>
> -----Original Message-----
> From: James Cook [mailto:jim...@do...]
> Sent: Wednesday, March 03, 2004 1:56 PM
> To: spr...@li...
> Subject: RE: RE: [Springframework-developer] Lifecycle methods
>
>
> Thanks, but in relation to my original request, how can I invoke a
> method on my singleton bean only after all other beans have been
> created by the factory? Does this capability exist?
>
> How are others handling a cyclic redundancy between two beans?
>
> > -----Original Message-----
> > [mailto:spr...@li...] On
> > Behalf Of Kopylenko, Dmitry Yes, this is the correct behavior of the
> > BeanFactoryPostProcessor.
> > postProcessBeanFactory() gets called when all bean definitions will
> > have been loaded, but no beans will have been instantiated yet.
>
>
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and
> deploy apps & Web services for Linux with a free DVD software kit from
> IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Springframework-developer mailing list
> Spr...@li...
> https://lists.sourceforge.net/lists/listinfo/springframework-developer
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo
technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|