package jp;

import jp.co.y_net.amm.dao.Inf;
import jp.co.y_net.amm.dao.InfDao;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestDb {
    public static void main(String[] args) {
        final ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("applicationContextBase.xml", "hibernateContextBase.xml");
        
        final InfDao infDao = (InfDao)context.getBean("infDao");
        
        for (Inf inf: infDao.get()) {
            System.out.println(inf.getInfid());
        }
        try {
            Thread.sleep(40 * 1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        for (Inf inf: infDao.get()) {
            System.out.println(inf.getInfid());
        }
        
//        BasicResourcePoolFactory
    }

}
