Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection pooling in postgresql

 
prantik bordoloi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can somebody please help me in making a connection pool class for postgresql using type 4 driver. if the possible a sample code !!
where can i get some good coding examples of connection pooling in the net ?
 
Bjarki Holm
Author
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prantik,
what JDBC drivers are you using? Most likely, if they are JDBC 2.0 compliant, they come with an implementation of the <code>javax.sql.ConnectionPoolDataSource</code> interface, which can be be used for connection pooling.
Cheers,
------------------
Bjarki Holm
Author of Professional Java Data
 
prantik bordoloi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using postgresql driver provided by postgresql.org, though it is type 4 driver it is not supporting JDBC2.x specfication
 
rani bedi
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check the following link :
http://www.javaworld.com/javaworld/jw-10-2000/jw-1027-pool.html
 
Franck Rasolo
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bjarki Holm:
Prantik,
what JDBC drivers are you using? Most likely, if they are JDBC 2.0 compliant, they come with an implementation of the <code>javax.sql.ConnectionPoolDataSource</code> interface, which can be be used for connection pooling.
Cheers,

Not necessarily. The <code>javax.sql.ConnectionPoolDataSource</code> interface is not part of JDBC 2.0 Core. It belongs to the JDBC 2.0 Optional Package (a.k.a. Standard Extensions). Therefore, if it doesn't support the JDBC 2.x spec, you can either write your own connection pooling framework or use an existing one such as PoolMan, which is free and open source.

Franck Rasolo
Independent Java Consultant
London, UK

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic