/** * Destroy the pipeline context. This method must be called on the context whether the pipeline * terminated successfully or not. * * @param success true if the pipeline executed without exceptions, false otherwise */ public void destroy(boolean success) { if (!destroyed) { try { if (trace != null) { trace.contextDestroyed(success); } if (listeners != null) { for (final ContextListener contextListener : listeners) { contextListener.contextDestroyed(success); } } } finally { destroyed = true; } } }