public synchronized static void destroy(){
  if (isInitialized()) {
    Map<String,DmnEngine> engines=new HashMap<String,DmnEngine>(dmnEngines);
    dmnEngines=new HashMap<String,DmnEngine>();
    for (    String dmnEngineName : engines.keySet()) {
      DmnEngine dmnEngine=engines.get(dmnEngineName);
      try {
        dmnEngine.close();
      }
 catch (      Exception e) {
        log.error("exception while closing {}",(dmnEngineName == null ? "the default dmn engine" : "dmn engine " + dmnEngineName),e);
      }
    }
    dmnEngineInfosByName.clear();
    dmnEngineInfosByResourceUrl.clear();
    dmnEngineInfos.clear();
    setInitialized(false);
  }
}

public synchronized static void destroy ( ) { if ( isInitialized ( ) ) { Map < String , DmnEngine > engines = new HashMap < String , DmnEngine > ( dmnEngines ) ; dmnEngines = new HashMap < String , DmnEngine > ( ) ; for ( String dmnEngineName : engines . keySet ( ) ) { DmnEngine dmnEngine = engines . get ( dmnEngineName ) ; try { dmnEngine . close ( ) ; } catch ( Exception e ) { log . error ( "exception while closing {}" , ( dmnEngineName == null ? "the default dmn engine" : "dmn engine " + dmnEngineName ) , e ) ; } } dmnEngineInfosByName . clear ( ) ; dmnEngineInfosByResourceUrl . clear ( ) ; dmnEngineInfos . clear ( ) ; setInitialized ( false ) ; } }
closes all dmn engines . this method should be called when the server shuts down .
