@Override
    public void destroy() throws Exception {
        for (final InstanceHolder instanceHolder : this.instances.values()) {
            if (instanceHolder.destructionCallback != null) {
                try {
                    instanceHolder.destructionCallback.run();
                } catch (Exception e) {
                    this.logger.warn(
                            "Destruction callback for bean named '"
                                    + instanceHolder.name
                                    + "' failed.",
                            e);
                }
            }
        }

        this.instances.clear();
    }
@ Override public void destroy ( ) throws Exception { for ( final InstanceHolder instanceHolder : this . instances . values ( ) ) { if ( instanceHolder . destructionCallback != null ) { try { instanceHolder . destructionCallback . run ( ) ; } catch ( Exception e ) { this . logger . warn ( "Destruction callback for bean named '" + instanceHolder . name + "' failed." , e ) ; } } } this . instances . clear ( ) ; }
/* (non-Javadoc)
@see org.springframework.beans.factory.DisposableBean#destroy()