public void destroy(T handler) { if (this.beanFactory != null) { this.beanFactory.destroyBean(handler); } }
public void releaseInstance(ConstraintValidator<?, ?> instance) { this.beanFactory.destroyBean(instance); }
public void releaseInstance(ConstraintValidator<?, ?> instance) { this.beanFactory.destroyBean(instance); }
public void releaseInstance(ConstraintValidator<?, ?> instance) { getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance); }
public void releaseInstance(ConstraintValidator<?, ?> instance) { getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance); }
@ManagedOperation public boolean rebind(String name) { if (!this.beans.getBeanNames().contains(name)) { return false; } if (this.applicationContext != null) { try { Object bean = this.applicationContext.getBean(name); if (AopUtils.isAopProxy(bean)) { bean = ProxyUtils.getTargetObject(bean); } if (bean != null) { this.applicationContext.getAutowireCapableBeanFactory().destroyBean(bean); this.applicationContext.getAutowireCapableBeanFactory() .initializeBean(bean, name); return true; } } catch (RuntimeException e) { this.errors.put(name, e); throw e; } catch (Exception e) { this.errors.put(name, e); throw new IllegalStateException("Cannot rebind to " + name, e); } } return false; }
public void destroy(T handler) { if (this.beanFactory != null) { this.beanFactory.destroyBean(handler); } }
public void destroy(T handler) { if (this.beanFactory != null) { this.beanFactory.destroyBean(handler); } }
public void releaseInstance(ConstraintValidator<?, ?> instance) { this.beanFactory.destroyBean(instance); }
public void destroy(T handler) { if (this.beanFactory != null) { if (logger.isTraceEnabled()) { logger.trace("Destroying handler instance {}", handler); } this.beanFactory.destroyBean(handler); } }
public void destroy(T handler) { if (this.beanFactory != null) { if (logger.isTraceEnabled()) { logger.trace("Destroying handler instance {}", handler); } this.beanFactory.destroyBean(handler); } }
@Override public void releaseInstance(ConstraintValidator<?, ?> instance) { trace( "Destroying validator bean of class {}", instance.getClass().getSimpleName() ); beanFactory.destroyBean(instance); }
/** * validates if a object matches the allowed data format of the * corresponding key * * @param context * application context * @param value * which will be validated * @throws TenantConfigurationValidatorException * is thrown, when object is invalid */ public void validate(final ApplicationContext context, final Object value) { final TenantConfigurationValidator createdBean = context.getAutowireCapableBeanFactory() .createBean(validator); try { createdBean.validate(value); } finally { context.getAutowireCapableBeanFactory().destroyBean(createdBean); } }
public void releaseInstance(ConstraintValidator<?, ?> instance) { getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance); }
@Override public <T> void destroyDependendInstance(T instance, Class<T> cls) { Assert.requireNonNull(instance, "instance"); Assert.requireNonNull(cls, "cls"); ApplicationContext context = getContext(); context.getAutowireCapableBeanFactory().destroyBean(instance); }
public void releaseInstance(ConstraintValidator<?, ?> instance) { getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance); }
@Override public <T> void destroyDependentInstance(T instance, Class<T> cls) { Assert.requireNonNull(instance, "instance"); Assert.requireNonNull(cls, "cls"); ApplicationContext context = getContext(); context.getAutowireCapableBeanFactory().destroyBean(instance); }
@ManagedOperation public boolean rebind(String name) { if (!this.beans.getBeanNames().contains(name)) { return false; } if (this.applicationContext != null) { try { Object bean = this.applicationContext.getBean(name); if (AopUtils.isAopProxy(bean)) { bean = ProxyUtils.getTargetObject(bean); } if (bean != null) { this.applicationContext.getAutowireCapableBeanFactory().destroyBean(bean); this.applicationContext.getAutowireCapableBeanFactory() .initializeBean(bean, name); return true; } } catch (RuntimeException e) { this.errors.put(name, e); throw e; } catch (Exception e) { this.errors.put(name, e); throw new IllegalStateException("Cannot rebind to " + name, e); } } return false; }
LOG.error("Error while stopping consumer.", e); beanFactory.destroyBean(consumer);