@Override public void init(ServletConfig config) throws ServletException { super.init(config); WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext()); jookService = (JookService) context.getBean(Jook.SPRING_BEAN_NAME_JOOK_SERVICE); }
/** @see Servlet#init(ServletConfig) */ public void init(ServletConfig config) throws ServletException { super.init(config); userDAO = new UserDAOImpl( (DataSource) config.getServletContext().getAttribute(Initialiser.DATA_SOURCE)); // userDAO = new UserDAOImpl(getDataSource()); }
@Override public void init() throws ServletException { super.init(); this.buildBeanFactoryConfig(); this.buildBeanFactory(); this.doAfterBeanFactory(); this.buildWebHandlers(); }
public void init(ServletConfig config) throws ServletException { super.init(config); ConnectionManager manager = (ConnectionManager) config.getServletContext().getAttribute(Attributs.CONNECTION_MANAGER); userDao = new UserDaoImpl(manager); }