Hi all.
I'm new to this, so bear with me!
I have a web application which is for installing on multiple other users' servers (running
Tomcat). I want to use connection pooling, but I don't want users to have to set up data source information in their Tomcat configuration files.
So, I was going to use something like this (found on usenet):
However, I'm not sure how best to deploy this. I don't want to create a new datasource everytime I need to connect to a database, do I?
Should I rewrite this class as a
servlet, and run it on my webapp's startup, then use the same datasource in all the
jsp pages in my application?
How about closing the datasource? Do I need to do that or will it happen automatically when I return all the datasource's connections?
Thanks for help!
M