I have a spring application that is not calling methods to destroy bean on shut down. I have seen this in the context of being instant in a Bean Refactory, and it can be manually inserted on the application context through the Callout Shutdown (). This method has disappeared from version 2.0 - 2.5 in spring.
"post-text"
Itemprop = "text">
This method is still available and Is implemented.
So you may be able to do this
ApplicationContext ctx = ...; If (ctx example configurable application link) {(configurable application link) ctx) .registerShutdownHook (); }
Alternatively, you can simply call (Configure AppliesContacts) CTX). Close ()
While closing yourself or closing your own self:
Runtime.GetReight (). AddShutdownHook (new thread) (run public) (if (ctx example configurable application link) {((configurable app content) ctx) .close ();}}});
No comments:
Post a Comment