SSL and PGPoolingDataSource - Mailing list pgsql-jdbc

From Oleg Vasylenko
Subject SSL and PGPoolingDataSource
Date
Msg-id 4B83B48A.6070206@gmail.com
Whole thread Raw
Responses Re: SSL and PGPoolingDataSource  (Kris Jurka <books@ejurka.com>)
List 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;
        }
  }

.......
..
.
}




pgsql-jdbc by date:

Previous
From: Michael Epstein
Date:
Subject: COPY problem in JDBC driver
Next
From: Maciek Sakrejda
Date:
Subject: synchronization problems with COPY on connection failure