public synchronized void dispose()
  {
    if (!closed)
    {
      LOG.info("Shutting down the plugin handler and all registered plugins.");
      Iterator<PluginWrapper> iterator = plugins.iterator();
      while (iterator.hasNext())
      {
        PluginWrapper pluginWrapper = iterator.next();

        try
        {
          if (pluginWrapper.isPluginEnabled())
          {
            pluginWrapper.disablePlugin();
          }

          if (pluginWrapper.isPluginInitialized())
          {
            pluginWrapper.destroyPlugin();
          }
        }
        catch (InitializationException e)
        {
          // nothing to do
        }
      }
      closed = true;
    }
    else
    {
      LOG.info("PluginHandler already shut down. Skipping.");
    }
  }