The method with the @Remove annotation must be explicitly called by the client, then the container will call the method annotated with @PreDestroy implicitly, if it exists. After that, the bean instance will be ready for garbage collection.
This is the only life cycle method that the client can control; all other methods are controlled by the container.
Nayan wadekar
source share