• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connection pooling

 
Muhammad Qureshi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I have lots of questions regarding connnection pooling, Is it different for each server? If yes then statement "code once run any where" become false. Is there any way to write a connection pooling code that runs one every server. Do JDBC 2.0 API supports connection pooling.
regards
Qureshi,
SCJP.
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, there are ways to write a connection pooling code that runs one every server.
And of course JDBC 2.0 supports connection pooling.
But also every vendor can provide its server/DB with a connection pooling class improved to fully use the posibilities of their own ad-hoc DBC components, or their proper connection and driver classes, etc....
But anyway you can always code you own CP class.
check this useful links:
coreServerls-Chapter 18: http://csajsp-chapters.corewebprogramming.com/CSAJSP-Chapter18.pdf
Sun. JDBC online training: http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/conpool.html
HTH
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not quite sure if jdbc 2.0 supports connection pooling ( i don't think so):
<extracted from sun web site>

Other major changes in the new version of the JDBC specification (3.0) include: Connection Pool configuration enhancements, Statement pooling for Pooled Connections, and a description of the migration path from the JDBC SPI (Service Provider Interface) to the Connector Architecture.

</extracted from sun web site>
http://java.sun.com/products/jdbc/
I am using connection pooling in my web application. I'm using dbconnectionbroker (you can find it in www.javaexchange.com). So, I did not have to reinvent the wheel.
hope it helps.
 
Remesh Govind
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
As they are in java will run any where. However why would someone want to sell their code for free .
So each comany comes with connections pools that are closely integrated with their products.
Yes it is possible to do the thing which you want you just have to know a lot of drivers and their intricies to make your stuff work !
however you can abstract it to the 2.0 API !
Regards
Remesh
rgnmen
Originally posted by Muhammad Qureshi:
Hello All,
I have lots of questions regarding connnection pooling, Is it different for each server? If yes then statement "code once run any where" become false. Is there any way to write a connection pooling code that runs one every server. Do JDBC 2.0 API supports connection pooling.
regards
Qureshi,
SCJP.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic