C3p0From Libzter
c3p0
[edit] OverviewThe 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] examplespublic 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/] User comments on this article (C3p0) |
||
Really easy to use with hibernate. It really saves the day with heavy databa