Package org.exoplatform.container.util

Examples of org.exoplatform.container.util.TemplateConfigurationHelper


         }
         if (LOG.isDebugEnabled())
         {
            LOG.debug("The configuration file of the DistributedCacheManager will be loaded from " + configurationFile);
         }
         final TemplateConfigurationHelper helper =
            new TemplateConfigurationHelper(new String[]{"^.*"}, new String[]{}, configManager);
         if (LOG.isDebugEnabled() && parameters != null && !parameters.isEmpty())
         {
            LOG.debug("The parameters to use while processing the configuration file are " + parameters);
         }
         return SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<EmbeddedCacheManager>()
         {
            public EmbeddedCacheManager run() throws Exception
            {
               Parser parser = new Parser(Thread.currentThread().getContextClassLoader());
               // Load the configuration
               ConfigurationBuilderHolder holder = parser.parse(helper.fillTemplate(configurationFile, parameters));
               GlobalConfigurationBuilder configBuilder = holder.getGlobalConfigurationBuilder();
               Utils.loadJGroupsConfig(configManager, configBuilder.build(), configBuilder);
               // Create the CacheManager from the new configuration
               EmbeddedCacheManager manager =
                  new DefaultCacheManager(configBuilder.build(), holder.getDefaultConfigurationBuilder().build());
View Full Code Here


         }
         if (LOG.isDebugEnabled())
         {
            LOG.debug("The configuration file of the DistributedCacheManager will be loaded from " + configurationFile);
         }
         final TemplateConfigurationHelper helper =
            new TemplateConfigurationHelper(new String[]{"^.*"}, new String[]{}, configManager);
         if (LOG.isDebugEnabled() && parameters != null && !parameters.isEmpty())
         {
            LOG.debug("The parameters to use while processing the configuration file are " + parameters);
         }
         return SecurityHelper.doPrivilegedIOExceptionAction(new PrivilegedExceptionAction<EmbeddedCacheManager>()
         {
            public EmbeddedCacheManager run() throws Exception
            {
               ParserRegistry parser = new ParserRegistry(Thread.currentThread().getContextClassLoader());
               // Load the configuration
               ConfigurationBuilderHolder holder = parser.parse(helper.fillTemplate(configurationFile, parameters));
               GlobalConfigurationBuilder configBuilder = holder.getGlobalConfigurationBuilder();
               Utils.loadJGroupsConfig(configManager, configBuilder.build(), configBuilder);
               // Create the CacheManager from the new configuration
               EmbeddedCacheManager manager =
                  new DefaultCacheManager(configBuilder.build(), holder.getDefaultConfigurationBuilder().build());
View Full Code Here

TOP

Related Classes of org.exoplatform.container.util.TemplateConfigurationHelper

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.