(RegionDao) context.getBean("regionDao");
final ConstructionExampleDao csamplesDao =
(ConstructionExampleDao) context.getBean("constructionExampleDao");
final DetailDaoHibernate detailDao =
(DetailDaoHibernate) context.getBean("detailDao");
PlatformTransactionManager txManager =
(PlatformTransactionManager) context.getBean("txManager");
new TransactionTemplate(txManager).execute(new TransactionCallback() {
@Override
public Object doInTransaction(TransactionStatus arg0) {
long start = System.currentTimeMillis();
detailDao.getAllPipe();
long end = System.currentTimeMillis();
System.out.println("Work time:" + (end - start));
return null;
}