SSL and PGPoolingDataSource
- From: Oleg Vasylenko <olegvvasylenko(at)gmail(dot)com>
- To: pgsql-jdbc(at)postgresql(dot)org
- Subject: SSL and PGPoolingDataSource
- Date: Tue, 23 Feb 2010 12:57:14 +0200
- Message-id: <4B83B48A.6070206@gmail.com> <text/plain>
Hi, everybody.
Trying to create PGPoolingDataSource with SSL support I found that
PGPoolingDataSource.initialize() sends no information to new
PGConnectionPoolDataSource object about SSL status, and as a result it's
impossible to create a Connection with ssl.
I think it's necessary add two code row like shown below.
public abstract class AbstractJdbc23PoolingDataSource extends
BaseDataSource
{
.......
..
public void initialize() throws SQLException
{
synchronized (lock )
{
source = createConnectionPool();
source.setDatabaseName(getDatabaseName());
source.setPassword(getPassword());
source.setPortNumber(getPortNumber());
source.setServerName(getServerName());
source.setUser(getUser());
<<<< MAY BE ADD A FEW ROW HERE >>>>>
source.setSssl(getSsl());
source.setSslfactory(getSslFactory());
<<<------------------------------------------>>>
while (available.size() < initialConnections)
{
available.push(source.getPooledConnection());
}
initialized = true;
}
}
.......
..
.
}
Home |
Main Index |
Thread Index