public static void destroy(Destroyable d) { if (d != null) { try { d.destroy(); } catch (Throwable t) { if (log.isDebugEnabled()) { String msg = "Unable to cleanly destroy instance [" + d + "] of type [" + d.getClass().getName() + "]."; log.debug(msg, t); } } } }
/** * Destroys all beans created within this module that implement {@link org.apache.shiro.util.Destroyable}. Should be called when this * module will no longer be used. * * @throws Exception */ public final void destroy() { for (Destroyable destroyable : destroyables) { try { destroyable.destroy(); } catch(Exception e) { log.warn("Error destroying component class: " + destroyable.getClass(), e); } } }
/** * Calls the <tt>destroy()</tt> methods on the bean if it implements {@link org.apache.shiro.util.Destroyable} * * @param object the object being initialized. * @param name the name of the bean being initialized. * @throws BeansException if any exception is thrown during initialization. */ public void postProcessBeforeDestruction(Object object, String name) throws BeansException { if (object instanceof Destroyable) { try { if (log.isDebugEnabled()) { log.debug("Destroying bean [" + name + "]..."); } ((Destroyable) object).destroy(); } catch (Exception e) { throw new FatalBeanException("Error destroying bean [" + name + "]", e); } } }
public static void destroy(Destroyable d) { if (d != null) { try { d.destroy(); } catch (Throwable t) { if (log.isDebugEnabled()) { String msg = "Unable to cleanly destroy instance [" + d + "] of type [" + d.getClass().getName() + "]."; log.debug(msg, t); } } } }
public static void destroy(Destroyable d) { if (d != null) { try { d.destroy(); } catch (Throwable t) { if (log.isDebugEnabled()) { String msg = "Unable to cleanly destroy instance [" + d + "] of type [" + d.getClass().getName() + "]."; log.debug(msg, t); } } } }
/** * Destroys all beans created within this module that implement {@link org.apache.shiro.util.Destroyable}. Should be called when this * module will no longer be used. * * @throws Exception */ public final void destroy() { for (Destroyable destroyable : destroyables) { try { destroyable.destroy(); } catch(Exception e) { log.warn("Error destroying component class: " + destroyable.getClass(), e); } } }
/** * Calls the <tt>destroy()</tt> methods on the bean if it implements {@link org.apache.shiro.util.Destroyable} * * @param object the object being initialized. * @param name the name of the bean being initialized. * @throws BeansException if any exception is thrown during initialization. */ public void postProcessBeforeDestruction(Object object, String name) throws BeansException { if (object instanceof Destroyable) { try { if (log.isDebugEnabled()) { log.debug("Destroying bean [" + name + "]..."); } ((Destroyable) object).destroy(); } catch (Exception e) { throw new FatalBeanException("Error destroying bean [" + name + "]", e); } } }