Package com.jpoweredcart.common.system.setting

Examples of com.jpoweredcart.common.system.setting.DefaultSettingService


   
    if(applicationContext.containsBean("custom_settingService")){
      return (SettingService)applicationContext.getBean("custom_settingService");
    }
   
    DefaultSettingService settingService = new DefaultSettingService();
    settingService.setJdbcOperations(jdbcOperations());
    settingService.setEnvironment(env);
   
    if(env.getProperty("setting.cacheable", Boolean.class, Boolean.FALSE)){
      EhCacheFactoryBean cacheFactory = new EhCacheFactoryBean();
      //use default cache manager CacheManager.getInstance();
      cacheFactory.setCacheName("settingCache");
      try{
        cacheFactory.afterPropertiesSet();
      }catch(Exception e){
        //TODO: do something
        e.printStackTrace();
      }
      Ehcache settingCache = cacheFactory.getObject();
     
      settingService.setSettingCache(settingCache);
    }
   
    return settingService;
  }
View Full Code Here

TOP

Related Classes of com.jpoweredcart.common.system.setting.DefaultSettingService

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.