Search in sources :

Example 1 with ConfigService

use of com.sohu.cache.web.service.ConfigService in project cachecloud by sohutv.

the class SystemConfigRefreshJob method action.

@Override
public void action(JobExecutionContext context) {
    try {
        SchedulerContext schedulerContext = context.getScheduler().getContext();
        ApplicationContext applicationContext = (ApplicationContext) schedulerContext.get(APPLICATION_CONTEXT_KEY);
        ConfigService configService = applicationContext.getBean("configService", ConfigService.class);
        configService.reloadSystemConfig();
    } catch (SchedulerException e) {
        logger.error(e.getMessage(), e);
    }
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) ConfigService(com.sohu.cache.web.service.ConfigService) SchedulerException(org.quartz.SchedulerException) SchedulerContext(org.quartz.SchedulerContext)

Aggregations

ConfigService (com.sohu.cache.web.service.ConfigService)1 SchedulerContext (org.quartz.SchedulerContext)1 SchedulerException (org.quartz.SchedulerException)1 ApplicationContext (org.springframework.context.ApplicationContext)1