package kr.co.kcc.pms.survey.common.util;

import kefj2ee.framework.web.spring.base.BaseDao;

import org.springframework.stereotype.Repository;

@Repository
public class AutoConnectionDao extends BaseDao
{
  public void autoConnect()
  {

    getSqlMapClientTemplate().queryForObject("adm.autoConnect");
   
  }

}





package kr.co.kcc.pms.survey.common.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class AutoConnection
{
  @Autowired
  private AutoConnectionDao autoConnectionDao;
 
 
  @Scheduled(cron ="*/30 * * * * *") 
  public void autoConnect() throws Exception {
    System.out.println("agagagagag");
    autoConnectionDao.autoConnect();
  }
}



Posted by wychoi
,