public void contextDestroyed(ServletContextEvent arg0)  { 
        ServletContext context = arg0.getServletContext();
        DBConnection connection = (DBConnection)context.getAttribute("connection");
        connection.close();
    }