We have an app which defines JNDI resources inside spring [dataAccess.xml] as
and uses both JDBC template and StoreProcedure data access. In addition, we define data sources [db] inside our tomcat configuration file [as found in ~/tomcat/conf/Catalina/localhost/xxx.xml] using DBCP:
The issue we run into is if we redeploy to tomcat by copying the WAR file into the webapps directory, the old connections to the database are not detroyed. I know that if I define the datasource within spring, I can specify the destroy method, however this is not acceptable since we've several environments in which to run this app.
. . .
. . .
Any ideas on how to solve this issue? Since we use
I was thinking of subclassing it and having it invoke the dbcp's destroy....of course there's getting hold of the dbcp object....