/** * Stops the managed lifecycle beans in the reverse order they were added. */ @Override protected void doStop() throws Exception { _doStarted = false; super.doStop(); List<Bean> reverse = new ArrayList<>(_beans); Collections.reverse(reverse); MultiException mex = new MultiException(); for (Bean b : reverse) { if (b._managed==Managed.MANAGED && b._bean instanceof LifeCycle) { LifeCycle l = (LifeCycle)b._bean; try { stop(l); } catch (Throwable th) { mex.add(th); } } } mex.ifExceptionThrow(); }
stop((LifeCycle)bean._bean);
public void stop() { try { container.stop(); } catch (Exception e) { throw new IllegalStateException("Failed to stop managed objects container", e); } container.destroy(); cleanup(); }
public void stop() { try { container.stop(); } catch (Exception e) { throw new IllegalStateException("Failed to stop managed objects container", e); } container.destroy(); cleanup(); }
/** * Stops the managed lifecycle beans in the reverse order they were added. */ @Override protected void doStop() throws Exception { _doStarted = false; super.doStop(); List<Bean> reverse = new ArrayList<>(_beans); Collections.reverse(reverse); for (Bean b : reverse) { if (b._managed==Managed.MANAGED && b._bean instanceof LifeCycle) { LifeCycle l = (LifeCycle)b._bean; if (l.isRunning()) stop(l); } } }
stop((LifeCycle)bean._bean);
/** * Stops the managed lifecycle beans in the reverse order they were added. */ @Override protected void doStop() throws Exception { _doStarted = false; super.doStop(); List<Bean> reverse = new ArrayList<>(_beans); Collections.reverse(reverse); MultiException mex = new MultiException(); for (Bean b : reverse) { if (b._managed==Managed.MANAGED && b._bean instanceof LifeCycle) { LifeCycle l = (LifeCycle)b._bean; try { stop(l); } catch (Throwable th) { mex.add(th); } } } mex.ifExceptionThrow(); }
stop((LifeCycle)bean._bean);
containerLifeCycle.stop();