private void initCompanyInfo(ServletContext application, WebApplicationContext ctx) { ICompanyCategoryService service = (ICompanyCategoryService) ctx.getBean("companyCategoryService"); List<CompanyCategory> companyCategoryList = service.findAll(); if (companyCategoryList != null && companyCategoryList.size() != 0) { for (CompanyCategory companyCategory : companyCategoryList) { logger.info("Company Category " + companyCategory + "] has been found."); } application.setAttribute("companyCategoryList", companyCategoryList); // put the companyCategoryList into CompanyCategoryCache CompanyCategoryCache companyCategoryCache = CompanyCategoryCache.getInstance(); companyCategoryCache.setCompanyCategoryList(companyCategoryList); } else { logger.info("No company category exist."); } }
public void setService(ICompanyCategoryService service) { System.out.println("pdczjv - set init service : " + service.toString()); this.service = service; }