servlet直接调用spring的serivce方法

ServletContext sc = this.getServletContext();

		WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(sc);

		this.serviceFacade = (XlycServiceFacade) wac.getBean("XlycServiceFacade");

		t = new Timer();

		TimerCancelorder tco = new TimerCancelorder();

		tco.setServiceFacade(this.serviceFacade);

		t.schedule(tco, 0,60*60*1000);
posted @ 2008-07-11 17:24  maventalker  阅读(58)  评论(0编辑  收藏  举报