* Destroy singleton context.
* @param servletContext servlet context
*/
private void destroySingletonContext(ServletContext servletContext)
{
SingletonContext context = null;
//look for saved context
if(servletContext != null)
{
context = currentSingletonContexts.get(servletContext);
}
//using in tests
if(context == null)
{
context = this.sharedSingletonContext;
}
//context is not null
//destroyDependents it
if(context != null)
{
context.destroy();
}
//remove it from saved contexts
if(servletContext != null)
{