Hello Pau,

Tuesday, September 19, 2000, 12:52:00 PM, you wrote:

PG>     We are also developing a JSP+JDBC based Web and we have a question: Where is
PG> better to open the connection to the DB through the JDBC driver?

PG>     - JSP page (one connection for the entire session)
PG>    - Java Bean (one connection for each query, isn't it?)

The best way is use connection pool and do all requests to database in
backend beans - do all listed operations in one method:
 get connection from pool
 prepare statement
 execute it
 process results
 close statement
 return connection to pool.

--
Best regards,
 Oleg                            mailto:[EMAIL PROTECTED]

===========================================================================
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

Reply via email to