use connection pooling
| От | janaka priyadarshana | 
|---|---|
| Тема | use connection pooling | 
| Дата | |
| Msg-id | de1942f0612212258o5861e88cg1627a1bd340d218@mail.gmail.com обсуждение исходный текст | 
| Ответы | Re: use connection pooling | 
| Список | pgsql-jdbc | 
		
			i am tring to use connection pooing with postgresql but i was unable to found complete example about that.
got some idea from the documentation, but i was unable to run the given example.
please help me to getting start..
thanks....
	
got some idea from the documentation, but i was unable to run the given example.
please help me to getting start..
thanks....
Jdbc3PoolingDataSource source = new Jdbc3PoolingDataSource();
source.setDataSourceName("A Data Source");
source.setServerName ("localhost");
source.setDatabaseName("test");
source.setUser("testuser");
source.setPassword("testpassword");
source.setMaxConnections(10);
Connection con = null;
try {
con = source.getConnection();
// use connection
} catch (SQLException e) {
// log error
} finally {
if (con != null) {
try { con.close(); } catch (SQLException e) {}
}
}
В списке pgsql-jdbc по дате отправления: