From: Oleg Vasylenko <olegvvasylenko@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: SSL and PGPoolingDataSource
Date: Tue, 23 Feb 2010 12:57:14 +0200
Message-ID: <4B83B48A.6070206@gmail.com> (raw)
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;
}
}
.......
..
.
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: olegvvasylenko@gmail.com
Subject: Re: SSL and PGPoolingDataSource
In-Reply-To: <4B83B48A.6070206@gmail.com>
References: <4B83B48A.6070206@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox