Examples of ExoCacheInitException


Examples of org.exoplatform.services.cache.ExoCacheInitException

               final Class clazz = cl.loadClass(config.getImplementation());
               return (ExoCache)clazz.newInstance();
            }
            catch (Exception e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
         }
      }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

            }
         });
      }
      catch (Exception e)
      {
         throw new ExoCacheInitException("The cache '" + region + "' could not be initialized", e);
      }
      return eXoCache;
   }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

      {
         key = new ConfigurationKey(cfg);
      }
      catch (CloneNotSupportedException e)
      {
         throw new ExoCacheInitException("Cannot clone the configuration.", e);
      }
      if (caches.containsKey(key))
      {
         cache = caches.get(key);
      }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

               final Class clazz = cl.loadClass(config.getImplementation());
               return (ExoCache)clazz.newInstance();
            }
            catch (ExceptionInInitializerError e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
            catch (SecurityException e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
            catch (ClassNotFoundException e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
            catch (InstantiationException e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
            catch (IllegalAccessException e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
         }
      }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

                  // Read the configuration file of the cache
                  is = configManager.getInputStream(cacheConfigTemplate);
               }
               catch (Exception e)//NOSONAR
               {
                  throw new ExoCacheInitException("The configuration of the CacheManager cannot be loaded from '"
                     + cacheConfigTemplate + "'", e);
               }
               if (is == null)
               {
                  throw new ExoCacheInitException("The configuration of the CacheManager cannot be found at '"
                     + cacheConfigTemplate + "'");
               }
               GlobalConfigurationBuilder configBuilder;
               Configuration config;
               try
               {
                  Parser parser = new Parser(Thread.currentThread().getContextClassLoader());
                  // Loads the configuration from the input stream
                  ConfigurationBuilderHolder holder = parser.parse(is);
                  configBuilder = holder.getGlobalConfigurationBuilder();
                  config = holder.getDefaultConfigurationBuilder().build();
               }
               catch (RuntimeException e) //NOSONAR
               {
                  throw new ExoCacheInitException("Cannot parse the configuration '" + cacheConfigTemplate + "'", e);
               }
               configureCacheManager(configBuilder);
               DefaultCacheManager cacheManager;
               try
               {
                  // Create the CacheManager from the new configuration
                  cacheManager = new DefaultCacheManager(configBuilder.build(), config);
               }
               catch (RuntimeException e) //NOSONAR
               {
                  throw new ExoCacheInitException(
                     "Cannot initialize the CacheManager corresponding to the configuration '" + cacheConfigTemplate
                        + "'", e);
               }
               // Register the main cache manager
               mappingGlobalConfigCacheManager.put(cacheManager.getCacheManagerConfiguration().transport().clusterName(),
                  cacheManager);
               return cacheManager;
            }
         });
      }
      catch (PrivilegedActionException e)
      {
         Throwable cause = e.getCause();
         if (cause instanceof ExoCacheInitException)
         {
            throw (ExoCacheInitException)cause;//NOSONAR
         }
         else
         {
            throw new ExoCacheInitException(e);
         }
      }
   }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

            }
         });
      }
      catch (Exception e) //NOSONAR
      {
         throw new ExoCacheInitException("The cache '" + region + "' could not be initialized", e);
      }
      return eXoCache;
   }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

      {
         return new GenericExoCache(config, cacheGetter.call());
      }
      catch (Exception e)//NOSONAR
      {
         throw new ExoCacheInitException("Cannot create the cache '" + config.getName() + "'", e);
      }
   }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

            jmxManagers.add(jmxManager);
         }
      }
      catch (Exception e)
      {
         throw new ExoCacheInitException("The cache '" + region + "' could not be initialized", e);
      }
      return eXoCache;
   }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

               final Class clazz = cl.loadClass(config.getImplementation());
               return (ExoCache)clazz.newInstance();
            }
            catch (Exception e)
            {
               throw new ExoCacheInitException("Cannot create instance of ExoCache of type "
                  + config.getImplementation(), e);
            }
         }
      }
View Full Code Here

Examples of org.exoplatform.services.cache.ExoCacheInitException

            }
         });
      }
      catch (Exception e)
      {
         throw new ExoCacheInitException("The cache '" + region + "' could not be initialized", e);
      }
      return eXoCache;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.