/** * Shuts down this controller. For proper shut down, make sure this method is called * after all threads left the processing methods. No calls processing will be * performed after invoking this method. */ public void dispose() { if (closed) return; try { if (this.context != null) { componentManager.dispose(); this.context.dispose(); this.context = null; } } finally { this.closed = true; } }
final ControllerContextImpl context = new ControllerContextImpl(); try context.dispose();