Is there a difference between setting up a db connection through tomcat (using the tomcat config ) and building one internally into a servlet? I'm looking to improve the performance of my project and am uncertain which path to take. Also, does the tomcat configuration affect how threading within servlets are handled? ( If so, does Pro Jakarta Tomcat 5 cover these issues? ) Thanks!
-------<br /> Aodhan H - Ad Astra Per Aspera<br /> -------
for my application, for each request it handles, it must make several sql queries. Sometimes multiple JDBC connection objects are created in the cycle of the request. I'm thinking of threading the sql queries to improve speed.
Regarding threading, what I want to know is whether how the container is set up, the Tomcat configuration, might impact the threading of my application.
The biggest issue I see with using the containers connection pooling is with portablility.
The code to create a good connection pool is fairly trivial and small. This being the case, why would I want to reduce my flexabiltiy when I could readily handle such things as the threading you mentioned as a requirement in my own code?
I know that if there were many lines of code required to create a timed self leveling pool that it would be adventageouse to use the container to do this. It is not the case that a large amount of code is required to do this so I have chosen to create my own.