Libraries
Articles

C3p0

From Libzter

Share/Save/Bookmark
Jump to: navigation, search


c3p0

Developer(s)c3p0 team
Initial Release2001-04-16
Current Version0.9.1.2
Language(s)java
Licence(s)LPGL
Platform(s)cross platform

[edit] Overview

The c3p0 library provides a robust and flexible connection pool for JDBC. The goal for the library was to take traditional JDBC drivers and make them “enterprise-ready”. The way this is done is to augment the driver with functionality defined in jdbc3 and the optional extensions that can be found in jdbc2.

[edit] examples

public HelloC3P0{
  public static void Main(){
    ComboPooledDataSource cpds = new ComboPooledDataSource(); 
    cpds.setDriverClass( "DriverClass" ); 
    cpds.setJdbcUrl( "databaseURL " ); 
    cpds.setUser("user");
    cpds.setPassword("password"); 
    setOptions(cpds);
  }
  public static void setOptions(ComboPooledDataSource cpds){
  // Here are example of how you can configure c3p0 
    cpds.setMinPoolSize(3); 
    cpds.setMaxPoolSize(15);
  }
}

[edit] Resources

[http://sourceforge.net/projects/c3p0/]


Library Navigation

  • Language

  • Category
Google AdSense