/** * Shutdowns the scope and calls all collected destroyable beans. */ @Override public void shutdown() { if (destroyableBeans == null) { return; } for (final BeanData destroyableBean : destroyableBeans) { destroyableBean.callDestroyMethods(); } destroyableBeans.clear(); }
/** * Iterate all beans and invokes registered destroy methods. */ @Override public void shutdown() { for (final BeanData beanData : instances.values()) { beanData.callDestroyMethods(); } instances.clear(); } }
/** * Removes destroyable bean from the list and calls it destroy methods. * If bean is not destroyable, does nothing. Bean gets destroyed only once. */ protected void destroyBean(final BeanData beanData) { if (destroyableBeans == null) { return; } if (!isBeanDestroyable(beanData)) { return; } if (destroyableBeans.remove(beanData)) { beanData.callDestroyMethods(); } }
/** * Shutdowns the scope and calls all collected destroyable beans. */ @Override public void shutdown() { if (destroyableBeans == null) { return; } for (final BeanData destroyableBean : destroyableBeans) { destroyableBean.callDestroyMethods(); } destroyableBeans.clear(); }
/** * Iterate all beans and invokes registered destroy methods. */ @Override public void shutdown() { for (final BeanData beanData : instances.values()) { beanData.callDestroyMethods(); } instances.clear(); } }
/** * Removes destroyable bean from the list and calls it destroy methods. * If bean is not destroyable, does nothing. Bean gets destroyed only once. */ protected void destroyBean(final BeanData beanData) { if (destroyableBeans == null) { return; } if (!isBeanDestroyable(beanData)) { return; } if (destroyableBeans.remove(beanData)) { beanData.callDestroyMethods(); } }