I have a war file that defines a context.xml file, some cxf based web services and a few other background tasks using quartz that are initialized in a servlet context listener.
When tomcat shuts down, it appears that tomcat stops the database connection pool before the cxf services or the quartz tasks. This causes huge amounts of log output. I'm a bit unclear as to how to adjust/change the shutdown order of the database pool vs the servlet listeners. The web app's web.xml does declare a resource-ref element that points at the jndi lookup name, but perhaps the configuration is wrong. I have looked at https://tomcat.apache.org/tomcat-8.0-doc/jndi-resources- howto.html#JDBC_Data_Sources and my configuration appears to be correct, however something is still not quite right. What am I doing wrong?