From: | Oleg Vasylenko <olegvvasylenko(at)gmail(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | SSL and PGPoolingDataSource |
Date: | 2010-02-23 10:57:14 |
Message-ID: | 4B83B48A.6070206@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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;
}
}
.......
..
.
}
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Epstein | 2010-02-23 19:44:22 | COPY problem in JDBC driver |
Previous Message | Tom Lane | 2010-02-21 22:24:20 | Re: Column is of type date but expression is of type text |