Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.Configuration


   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration config = getConfiguration();
      if (config == null)
      {
         log.warn("The configuration of the RootContainer could not be found");
         return null;
      }
      return config.toXML();
   }
View Full Code Here


   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration config = getConfiguration();
      if (config == null)
      {
         log.warn("The configuration of the StandaloneContainer could not be found");
         return null;
      }
      return config.toXML();
   }
View Full Code Here

   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration conf = getConfiguration();
      if (conf == null)
      {
         log.warn("The configuration of the PortalContainer could not be found");
         return null;
      }
      Configuration result = Configuration.merge(((ExoContainer)parent).getConfiguration(), conf);
      if (result == null)
      {
         log.warn("The configurations could not be merged");
         return null;        
      }
      return result.toXML();
   }
View Full Code Here

   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration config = getConfiguration();
      if (config == null)
      {
         log.warn("The configuration of the StandaloneContainer could not be found");
         return null;
      }
      return config.toXML();
   }
View Full Code Here

      //
      try
      {
         ConfigurationUnmarshaller unmarshaller = new ConfigurationUnmarshaller(profiles);
         Configuration conf = unmarshaller.unmarshall(url);

         if (configurations_ == null)
            configurations_ = conf;
         else
            configurations_.mergeConfiguration(conf);
View Full Code Here

   private void dynamicReload()
   {
      final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
      final Properties currentSystemProperties = System.getProperties();
      boolean hasChanged = false;
      Configuration newConfig = null;
      try
      {
         Thread.currentThread().setContextClassLoader(loadingCL);
         hasChanged = true;
         System.setProperties(loadingSystemProperties);
         ConfigurationManager cm = loadConfigurationManager(this, false);
         if (cm != null)
         {
            newConfig = cm.getConfiguration();
         }
      }
      catch (Exception e)
      {
         if (LOG.isDebugEnabled())
         {
            LOG.debug("Could not load the new configuration of the root container", e);
         }
      }
      finally
      {
         if (hasChanged)
         {
            Thread.currentThread().setContextClassLoader(currentClassLoader);
            System.setProperties(currentSystemProperties);
         }
      }
      if (newConfig == null)
      {
         // We have no way to know if the configuration of the root container has changed so
         // we reload everything
         LOG.info("The new configuration of the root container could not be loaded,"
            + " thus everything will be reloaded");
         reload();
         return;
      }
      Configuration currentConfig = getConfiguration();
      if (currentConfig == null)
      {
         // We have no way to know if the configuration of the root container has changed so
         // we reload everything
         LOG.info("The current configuration of the root container could not be loaded," +
                  " thus everything will be reloaded");
         reload();
         return;
      }
      if (newConfig.getCurrentSize() != currentConfig.getCurrentSize()
         || newConfig.getCurrentHash() != currentConfig.getCurrentHash())
      {
         // The root container has changed so we reload everything
         LOG.info("The configuration of the root container has changed," +
                  " thus everything will be reloaded");
         reload();
View Full Code Here

         service.addConfiguration("file:" + overrideConf);
      }
      service.processRemoveConfiguration();
      if (PropertyManager.isDevelopping())
      {
         Configuration conf = service.getConfiguration();
         if (conf != null)
         {
            conf.keepCurrentState();
         }
      }
      return service;
   }
View Full Code Here

    */
   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration config = getConfiguration();
      if (config == null)
      {
         LOG.warn("The configuration of the RootContainer could not be found");
         return null;
      }
      return config.toXML();
   }
View Full Code Here

    */
   @Managed
   @ManagedDescription("The configuration of the container in XML format.")
   public String getConfigurationXML()
   {
      Configuration conf = getConfiguration();
      if (conf == null)
      {
         LOG.warn("The configuration of the PortalContainer could not be found");
         return null;
      }
      Configuration result = Configuration.merge(((ExoContainer)parent).getConfiguration(), conf);
      if (result == null)
      {
         LOG.warn("The configurations could not be merged");
         return null;        
      }
      return result.toXML();
   }
View Full Code Here

   private void dynamicReload()
   {
      final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
      final Properties currentSystemProperties = System.getProperties();
      boolean hasChanged = false;
      Configuration newConfig = null;
      try
      {
         Thread.currentThread().setContextClassLoader(loadingCL);
         hasChanged = true;
         System.setProperties(loadingSystemProperties);
         ConfigurationManager cm = loadConfigurationManager(this, false);
         if (cm != null)
         {
            newConfig = cm.getConfiguration();
         }
      }
      catch (Exception e)
      {
         if (LOG.isDebugEnabled())
         {
            LOG.debug("Could not load the new configuration of the root container", e);
         }
      }
      finally
      {
         if (hasChanged)
         {
            Thread.currentThread().setContextClassLoader(currentClassLoader);
            System.setProperties(currentSystemProperties);
         }        
      }
      if (newConfig == null)
      {
         // We have no way to know if the configuration of the root container has changed so
         // we reload everything
         LOG.info("The new configuration of the root container could not be loaded,"
            + " thus everything will be reloaded");
         reload();
         return;
      }
      Configuration currentConfig = getConfiguration();
      if (currentConfig == null)
      {
         // We have no way to know if the configuration of the root container has changed so
         // we reload everything
         LOG.info("The current configuration of the root container could not be loaded," +
                  " thus everything will be reloaded");
         reload();
         return;        
      }
      if (newConfig.getCurrentSize() != currentConfig.getCurrentSize()
         || newConfig.getCurrentHash() != currentConfig.getCurrentHash())
      {
         // The root container has changed so we reload everything
         LOG.info("The configuration of the root container has changed," +
                  " thus everything will be reloaded");
         reload();
View Full Code Here

TOP

Related Classes of org.exoplatform.container.xml.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.