Package org.springframework.beans.factory.config

Examples of org.springframework.beans.factory.config.ConfigurableListableBeanFactory.destroySingletons()


       
        DestructiveBean bean = (DestructiveBean) factory.getBean("destructiveBean");
       
        System.out.println("Calling destroySingletons()");
        factory.destroySingletons();
        System.out.println("Called destroySingletons()");
    }
}
View Full Code Here


                        "./ch5/src/conf/lifecycle/disposeInterface.xml"));

        DestructiveBeanWithInterface bean = (DestructiveBeanWithInterface) factory.getBean("destructiveBean");

        System.out.println("Calling destroySingletons()");
        factory.destroySingletons();
        System.out.println("Called destroySingletons()");

    }

}
View Full Code Here

        finishRefresh();
      }

      catch (BeansException ex) {
        // Destroy already created singletons to avoid dangling resources.
        beanFactory.destroySingletons();

        // Reset 'active' flag.
        cancelRefresh(ex);

        // Propagate exception to caller.
View Full Code Here

        }
        catch (BeansException ex) {
          // Destroy already created singletons to avoid dangling
          // resources.
          beanFactory.destroySingletons();
          cancelRefresh(ex);
          // propagate exception to the caller
          throw ex;
        }
      }
View Full Code Here

        finishRefresh();
      }

      catch (BeansException ex) {
        // Destroy already created singletons to avoid dangling resources.
        beanFactory.destroySingletons();

        // Reset 'active' flag.
        cancelRefresh(ex);

        // Propagate exception to caller.
View Full Code Here

        finishRefresh();
      }

      catch (BeansException ex) {
        // Destroy already created singletons to avoid dangling resources.
        beanFactory.destroySingletons();

        // Reset 'active' flag.
        cancelRefresh(ex);

        // Propagate exception to caller.
View Full Code Here

    ConfigurableListableBeanFactory oldBeanFactory = null;
    synchronized (this.beanFactoryMonitor) {
      oldBeanFactory = this.beanFactory;
    }
    if (oldBeanFactory != null) {
      oldBeanFactory.destroySingletons();
      synchronized (this.beanFactoryMonitor) {
        this.beanFactory = null;
      }
    }
View Full Code Here

        finishRefresh();
      }

      catch (BeansException ex) {
        // Destroy already created singletons to avoid dangling resources.
        beanFactory.destroySingletons();

        // Reset 'active' flag.
        cancelRefresh(ex);

        // Propagate exception to caller.
View Full Code Here

        finishRefresh();
      }

      catch (BeansException ex) {
        // Destroy already created singletons to avoid dangling resources.
        beanFactory.destroySingletons();

        // Reset 'active' flag.
        cancelRefresh(ex);

        // Propagate exception to caller.
View Full Code Here

                return null;
              }
              catch (BeansException ex) {
                // Destroy already created singletons to avoid
                // dangling resources.
                beanFactory.destroySingletons();
                cancelRefresh(ex);
                // propagate exception to the caller
                throw ex;
              }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.