add the BasicDataSource to ClassPathXmlApplicationContext of spring and inject it in the springBeans.xml file and then put the ClassPathXnlApplicationContext object to servletContext in the Listener when starting the web application