@Override public Collection<Job> reload(ApplicationContextFactory factory) { // If the same factory is loaded twice the context can be closed if (contexts.containsKey(factory)) { ConfigurableApplicationContext context = contexts.get(factory); for (String name : contextToJobNames.get(context)) { if (logger.isDebugEnabled()) { logger.debug("Unregistering job: " + name + " from context: " + context.getDisplayName()); } doUnregister(name); } context.close(); } try { return doLoad(factory, true); } catch (DuplicateJobException e) { throw new IllegalStateException("Found duplicate job in reload (it should have been unregistered " + "if it was previously registered in this loader)", e); } }
/** * Unregister all the jobs and close all the contexts created by this * loader. * * @see JobLoader#clear() */ @Override public void clear() { for (ConfigurableApplicationContext context : contexts.values()) { if (context.isActive()) { context.close(); } } for (String jobName : jobRegistry.getJobNames()) { doUnregister(jobName); } contexts.clear(); contextToJobNames.clear(); }
logger.debug("Unregistering job: " + jobName + " from context: " + context.getDisplayName()); doUnregister(jobName);
@Override public Collection<Job> reload(ApplicationContextFactory factory) { // If the same factory is loaded twice the context can be closed if (contexts.containsKey(factory)) { ConfigurableApplicationContext context = contexts.get(factory); for (String name : contextToJobNames.get(context)) { logger.debug("Unregistering job: " + name + " from context: " + context.getDisplayName()); doUnregister(name); } context.close(); } try { return doLoad(factory, true); } catch (DuplicateJobException e) { throw new IllegalStateException("Found duplicate job in reload (it should have been unregistered " + "if it was previously registered in this loader)", e); } }
/** * Unregister all the jobs and close all the contexts created by this * loader. * * @see JobLoader#clear() */ @Override public void clear() { for (ConfigurableApplicationContext context : contexts.values()) { if (context.isActive()) { context.close(); } } for (String jobName : jobRegistry.getJobNames()) { doUnregister(jobName); } contexts.clear(); contextToJobNames.clear(); }
@Override public Collection<Job> reload(ApplicationContextFactory factory) { // If the same factory is loaded twice the context can be closed if (contexts.containsKey(factory)) { ConfigurableApplicationContext context = contexts.get(factory); for (String name : contextToJobNames.get(context)) { if (logger.isDebugEnabled()) { logger.debug("Unregistering job: " + name + " from context: " + context.getDisplayName()); } doUnregister(name); } context.close(); } try { return doLoad(factory, true); } catch (DuplicateJobException e) { throw new IllegalStateException("Found duplicate job in reload (it should have been unregistered " + "if it was previously registered in this loader)", e); } }
/** * Unregister all the jobs and close all the contexts created by this * loader. * * @see JobLoader#clear() */ @Override public void clear() { for (ConfigurableApplicationContext context : contexts.values()) { if (context.isActive()) { context.close(); } } for (String jobName : jobRegistry.getJobNames()) { doUnregister(jobName); } contexts.clear(); contextToJobNames.clear(); }
/** * Unregister all the jobs and close all the contexts created by this * loader. * * @see JobLoader#clear() */ @Override public void clear() { for (ConfigurableApplicationContext context : contexts.values()) { if (context.isActive()) { context.close(); } } for (String jobName : jobRegistry.getJobNames()) { doUnregister(jobName); } contexts.clear(); }
@Override public Collection<Job> reload(ApplicationContextFactory factory) { // If the same factory is loaded twice the context can be closed if (contexts.containsKey(factory)) { ConfigurableApplicationContext context = contexts.get(factory); for (String name : contextToJobNames.get(context)) { if (logger.isDebugEnabled()) { logger.debug("Unregistering job: " + name + " from context: " + context.getDisplayName()); } doUnregister(name); } context.close(); } try { return doLoad(factory, true); } catch (DuplicateJobException e) { throw new IllegalStateException("Found duplicate job in reload (it should have been unregistered " + "if it was previously registered in this loader)", e); } }
logger.debug("Unregistering job: " + jobName + " from context: " + context.getDisplayName()); doUnregister(jobName);
logger.debug("Unregistering job: " + jobName + " from context: " + context.getDisplayName()); doUnregister(jobName);