• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use connection pooling in jsp?  RSS feed

 
honey singh
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to world of JSP. I'm developing web application using Oracle 8i and JSP to implement it. I'm using jakarta-tomcat server for this purpose.
I'll frequently access the database. so I want to use the connection pooling.
Can anybody explain the simple procedure to use it
thanx
 
Shawn Bayern
Author
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by harmanjeet s:
I'm new to world of JSP. I'm developing web application using Oracle 8i and JSP to implement it. I'm using jakarta-tomcat server for this purpose.
I'll frequently access the database. so I want to use the connection pooling.
Can anybody explain the simple procedure to use it
thanx

In J2EE, you can use javax.sql.DataSource objects as a factory behind which connections are pooled. Oracle and other database vendors often provide pooling DataSource implementations as part of their JDBC drivers.
To use a DataSource from Java code, simply consult the JavaDoc for javax.servlet.DataSource, which explains how it works. To use a pooling DataSource in JSP pages, you can also use JSTL's standard SQL tags, which let you configure a DataSource once and then forget about the issue; the SQL that you run will automatically be run through the DataSource you specify. (I discuss this kind of configuration in "JSTL in Action," my upcoming book).
For more info about the JSTL spec, see
http://java.sun.com/products/jsp/jstl
 
honey singh
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shawn,
thanx very much for the reply. I hope that it will work.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!