Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.DisposableBean


    }

    @Override
    public void destroy() throws Exception {
        if (executor instanceof DisposableBean) {
            DisposableBean bean = (DisposableBean) executor;
            bean.destroy();
        }
    }
View Full Code Here


        return false;
    }

    public void stop() throws JBIException {
        if (beanFactory instanceof DisposableBean) {
            DisposableBean disposable = (DisposableBean) beanFactory;
            try {
                disposable.destroy();
            } catch (Exception e) {
                throw new JBIException("Failed to dispose of the Spring BeanFactory due to: " + e, e);
            }
        }
        super.stop();
View Full Code Here

    }


    public void shutDown() throws JBIException {
        if (pojo instanceof DisposableBean) {
            DisposableBean disposableBean = (DisposableBean) pojo;
            try {
                disposableBean.destroy();
            }
            catch (Exception e) {
                throw new JBIException(e);
            }
        }
View Full Code Here

        }
    }

    public void stop(JBIContainer container) throws JBIException {
        if (beanFactory instanceof DisposableBean) {
            DisposableBean disposable = (DisposableBean) beanFactory;
            try {
                disposable.destroy();
            }
            catch (Exception e) {
                throw new JBIException("Failed to dispose of the Spring BeanFactory due to: " + e, e);
            }
        }
View Full Code Here

        start();
    }

    public void stop() throws JBIException {
        if (beanFactory instanceof DisposableBean) {
            DisposableBean disposable = (DisposableBean) beanFactory;
            try {
                disposable.destroy();
            }
            catch (Exception e) {
                throw new JBIException("Failed to dispose of the Spring BeanFactory due to: " + e, e);
            }
        }
View Full Code Here

      ((InitializingBean)obj).afterPropertiesSet();
    }
    //runInitializer(obj, ctxt.getInitializer());
    //applyBeanPostProcessorsAfterInitialization(bean, beanName, mergedBeanDefinition);
    if(original instanceof DisposableBean){
      final DisposableBean db = (DisposableBean)original;
      ctxt.manageDisposableBean(db);
    }
  }
View Full Code Here

        start();
    }

    public void stop() throws JBIException {
        if (beanFactory instanceof DisposableBean) {
            DisposableBean disposable = (DisposableBean) beanFactory;
            try {
                disposable.destroy();
            }
            catch (Exception e) {
                throw new JBIException("Failed to dispose of the Spring BeanFactory due to: " + e, e);
            }
        }
View Full Code Here

      // Remove a registered singleton of the given name, if any.
      removeSingleton(beanName);
    }

    // Destroy the corresponding DisposableBean instance.
    DisposableBean disposableBean = null;
    synchronized (this.disposableBeans) {
      disposableBean = (DisposableBean) this.disposableBeans.remove(beanName);
    }
    destroyBean(beanName, disposableBean);
  }
View Full Code Here

  public void destroySingleton(String beanName) {
    // Remove a registered singleton of the given name, if any.
    removeSingleton(beanName);

    // Destroy the corresponding DisposableBean instance.
    DisposableBean disposableBean;
    synchronized (this.disposableBeans) {
      disposableBean = (DisposableBean) this.disposableBeans.remove(beanName);
    }
    destroyBean(beanName, disposableBean);
  }
View Full Code Here

  public void destroySingleton(String beanName) {
    // Remove a registered singleton of the given name, if any.
    removeSingleton(beanName);

    // Destroy the corresponding DisposableBean instance.
    DisposableBean disposableBean;
    synchronized (this.disposableBeans) {
      disposableBean = (DisposableBean) this.disposableBeans.remove(beanName);
    }
    destroyBean(beanName, disposableBean);
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.DisposableBean

Copyright © 2018 www.massapicom. 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.