This application is running on Tomcat 4.0.4. Servlet is set up to start when the server is started. There is a listener class entry which listens on connectionpooling class. Problem is this is getting closed first and then when Servlet is getting closed it was trying to do some meintenece on database and finding that there are no connections available and is giving errors. IS there away to change the order of things so the servlet is closed first and then the conection pool?