Hi,
I was wondering if there's any way to define "bean destroy order"; say, to force a DisposableBean to be destroyed after another bean ( or, be the last bean to be destroyed)
thanks in advance![]()
Hi,
I was wondering if there's any way to define "bean destroy order"; say, to force a DisposableBean to be destroyed after another bean ( or, be the last bean to be destroyed)
thanks in advance![]()
Beans are destroyed in the reverse order as they are created (at least that is what spring tries to do). So if your bean is the first to be created it should be the last one destroyed.
Also why is this ordering so important, spring already does a best effort to resolve the order of bean destruction.
Marten Deinum
Java Consultant / Pragmatist / Open Source Enthousiast / Author
Pro Spring MVC: With Web Flow
Conspect
Have you read the reference guide.
Use the [ code ] tags, young padawan