Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Connection pooling with SQL Server

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am accessing SQL Server database which is located on another PC , from a linux PC through a jsp page using a pure jdbc driver but still the connection is very slow.I am using the Tomcat Servlet Engine.Could anyone tell me how to use connection pooling with my application.
Waiting in anticipation.
Syed.
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a link for a couple of different implementations of connection pooling. Basic idea is to have a servlet open on load of the web server, and that opens a certain number of connections to the database. Then have each of your servlets or jsp pages, grab one of those open connections and use that for database access. I have seen 3 or 4 different ways of doing this as I am trying to do one for a MySql database.
http://www.webdevelopersjournal.com/columns/connection_pool.html http://archive.coreservlets.com/Chapter18.html
I am about to finish compiling the different version I have seen and taking out the peices I want for a site I am working. Once I finish it, I will be posting it at this site: www.javaworkshop.net
Hope that helps.
Bill
 
Evildoers! Eat my justice! And this tiny ad's justice too!
The trailboss has a kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic