The question really revolves around use of database connection pools -
the reason I'm posting here is coz it relates to our model 2 jsp
application - so apologies if this is somewhat off topic.
Various web-actions in our application require database connections
which are checked out of a pool, the action is processed then they are
checked in.
For transactional reasons the same connection (or connections) is used
throughout the web action for each of the possibly many db operations
required.
Now there are certain queries which are used time and time again so it
would be nice to prepare them in advance (using preparedstatement),
unfortunately preparedstatement only prepares the statement on a
*particular* db connection, and, as I said before each request will
essentially use its own connection.
Is there any way around this or do I have to literally prepare every
statement on every connection in the pool? This could turn into a bit of
a nightmare.
TIA
--
Tim Fox (��o)
Senior developer
Hyperlink plc
http://hyperlink.com
email: [EMAIL PROTECTED]
phone: +44 (0) 207 240 8121
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets