Package org.springframework.context

Examples of org.springframework.context.Lifecycle.stop()


        support.getBean("ConfigurationContext", ConfigurationFactory.class).configure(args);
        lifecycle = support.getBean("LifeCycle", Lifecycle.class);

        lifecycle.start();
        lifecycle.stop();
    }

}
View Full Code Here


          }
          else {
            if (logger.isDebugEnabled()) {
              logger.debug("Stopping bean '" + beanName + "' of type [" + bean.getClass() + "]");
            }
            bean.stop();
            if (logger.isDebugEnabled()) {
              logger.debug("Successfully stopped bean '" + beanName + "'");
            }
          }
        }
View Full Code Here

      String[] dependentBeans = getBeanFactory().getDependentBeans(beanName);
      for (int i = 0; i < dependentBeans.length; i++) {
        doStop(lifecycleBeans, dependentBeans[i]);
      }
      if (bean.isRunning()) {
        bean.stop();
      }
      lifecycleBeans.remove(beanName);
    }
  }
View Full Code Here

      String[] dependentBeans = getBeanFactory().getDependentBeans(beanName);
      for (int i = 0; i < dependentBeans.length; i++) {
        doStop(lifecycleBeans, dependentBeans[i]);
      }
      if (bean.isRunning()) {
        bean.stop();
      }
      lifecycleBeans.remove(beanName);
    }
  }
View Full Code Here

  public void stop() {
    Iterator it = getLifecycleBeans().iterator();
    while (it.hasNext()) {
      Lifecycle lifecycle = (Lifecycle) it.next();
      if (lifecycle.isRunning()) {
        lifecycle.stop();
      }
    }
  }

  public boolean isRunning() {
View Full Code Here

      String[] dependentBeans = getBeanFactory().getDependentBeans(beanName);
      for (int i = 0; i < dependentBeans.length; i++) {
        doStop(lifecycleBeans, dependentBeans[i]);
      }
      if (bean.isRunning()) {
        bean.stop();
      }
      lifecycleBeans.remove(beanName);
    }
  }
View Full Code Here

          }
          else {
            if (logger.isDebugEnabled()) {
              logger.debug("Stopping bean '" + beanName + "' of type [" + bean.getClass() + "]");
            }
            bean.stop();
            if (logger.isDebugEnabled()) {
              logger.debug("Successfully stopped bean '" + beanName + "'");
            }
          }
        }
View Full Code Here

          }
          else {
            if (logger.isDebugEnabled()) {
              logger.debug("Stopping bean '" + beanName + "' of type [" + bean.getClass() + "]");
            }
            bean.stop();
            if (logger.isDebugEnabled()) {
              logger.debug("Successfully stopped bean '" + beanName + "'");
            }
          }
        }
View Full Code Here

      String[] dependentBeans = getBeanFactory().getDependentBeans(beanName);
      for (int i = 0; i < dependentBeans.length; i++) {
        doStop(lifecycleBeans, dependentBeans[i]);
      }
      if (bean.isRunning()) {
        bean.stop();
      }
      lifecycleBeans.remove(beanName);
    }
  }
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.