public boolean isRunning() { if (this.context != null) { return this.context.isRunning(); } return false; }
@Override public boolean isRunning() { return context.isRunning(); }
public boolean isRunning() { if (this.context != null) { return this.context.isRunning(); } return false; }
@Override public boolean isRunning() { lock.writeLock().lock(); try { return configurableApplicationContext.isRunning(); } finally { lock.writeLock().unlock(); } }
private void stopContext() { if (context != null && context.isRunning()) { context.stop(); context.close(); } }
@Override public void publishEvent(ApplicationEvent event) { if (context.isRunning()) { context.publishEvent(event); } else { deferredEvents.add(event); } }
@Override public void publishEvent(ApplicationEvent event) { if (context.isRunning()) { context.publishEvent(event); } else { deferredEvents.add(event); } }
@Override @ManagedAttribute public boolean isRunning() { return this.running && this.applicationContext.isRunning(); }
@Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (applicationContext.isRunning()) { registryHelper.postObjectRegistrationActions(bean); } return bean; } }
@Override public void destroy() { if (isActive() && context.isRunning()) { context.close(); } }
private void conditionallyRun() { if (!configurableApplicationContext.isRunning()) { log.debug("Skipping {} execution, spring context is not active yet", jobName); return; } run(); }
private void stopContext() { if (context != null && context.isRunning()) { context.stop(); context.close(); } }
@Override public void destroy() { if (isActive() && context.isRunning()) { context.close(); } }
@Override public Boolean isRunning() { return context.isActive() && context.isRunning(); }
try { this.runThread.join(timeout); this.running = context != null && context.isRunning();
this.runThread.join(timeout); this.runThread.setContextClassLoader(null); this.running = context != null && context.isRunning();
@Override public void onApplicationEvent(ContextRefreshedEvent event) { ConfigurableApplicationContext source = (ConfigurableApplicationContext) event.getSource(); if (source == this.applicationContext && !source.isRunning()) { source.start(); } } }
initApplicationContext(createApplicationContext(basePackagesArray, contextConfigLocationsArray))); Assert.state(localApplicationContext.isRunning(), String.format( "The Spring ApplicationContext (%1$s) failed to be properly initialized with the context config files (%2$s) or base packages (%3$s)!", nullSafeGetApplicationContextId(localApplicationContext), Arrays.toString(contextConfigLocationsArray),
initApplicationContext(createApplicationContext(basePackagesArray, contextConfigLocationsArray))); Assert.state(localApplicationContext.isRunning(), String.format( "The Spring ApplicationContext (%1$s) failed to be properly initialized with the context config files (%2$s) or base packages (%3$s)!", nullSafeGetApplicationContextId(localApplicationContext), Arrays.toString(contextConfigLocationsArray),