Is it possible to create and modify global connection pool on the fly?
I want do be able to deploy new applications using new global connection pool without restart tomcat. I don't want to use context.xml file in my applications.
The article http://www.tomcatexpert.com/blog/2010/04/01/configuring-jdbc-pool-high-concurrency shows how to create global connection pool configuring conf/server.xml file, but I don't know how to reflect change without restarting tomcat.
Is it possible to create new resources (as in <GlobalNamingResources><Resource .../></GlobalNamingResources>) at runtime? No. To create new global resources you need to modify "conf/server.xml" and restart Tomcat.
Is it possible to modify existing global resources? It depends. Some resources expose properties via JMX and those properties can be modified through jconsole. If your resource exposes the properties that you need to modify then you should be able to update them at runtime.
Typically, when you need to be able to modify a resource without restarting Tomcat you would define that in your Context. That way you can make changes to the Context, redeploy your application and see the changes all without restarting Tomcat.
Popular Links