Home » Spring-Framework-090522 » org.springframework » beans » factory » [javadoc | source]
org.springframework.beans.factory
public interface: DisposableBean [javadoc | source] Interface to be implemented by beans that want to release resources on destruction. A BeanFactory is supposed to invoke the destroy method if it disposes a cached singleton. An application context is supposed to dispose all of its singletons on close.

An alternative to implementing DisposableBean is specifying a custom destroy-method, for example in an XML bean definition. For a list of all bean lifecycle methods, see the BeanFactory javadocs.

Method from org.springframework.beans.factory.DisposableBean Summary:
destroy
Method from org.springframework.beans.factory.DisposableBean Detail:
 public  void destroy() throws Exception
    Invoked by a BeanFactory on destruction of a singleton.