package com.cftech.accounts.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.stereotype.Service;

//@Configuration
public class MySchedulerListener {
      
//    @Autowired
    MyJobFactory myJobFactory;

      
//    @Bean(name ="schedulerFactoryBean")
    public SchedulerFactoryBean schedulerFactory() {
        SchedulerFactoryBean bean = new SchedulerFactoryBean();
        bean.setJobFactory(myJobFactory);
        bean.setConfigLocation(new ClassPathResource("quartz.properties"));
//        System.out.print(bean.PROP_THREAD_COUNT);
        return bean;  
    }  
  
}  