Glassfish ignoring "ssl" property in connection pool of PostgreSQL

From: Nookala Satish Kumar <nosaku(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Glassfish ignoring "ssl" property in connection pool of PostgreSQL
Date: 2010-03-27 19:20:14
Message-ID: b613f02a1003271220r59be9d75i5f051e7ded7e1429@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

Glassfish ignoring "ssl" (and sslfactory) property in connection pool of
PostgreSQL. I tried to establish a SSL connection string to PostgreSQL, but
it is not taking. I tried with the normal JDBC URL in a standalone program
and it works. Any ideas?

Here are my connection pool properties in Glassfish:

User: test
DatabaseName: test
Password: test123
ssl: true
sslfactory: org.postgresql.ssl.NonValidatingFactory
ServerName: localhost
PortNumber: 5432

Here is my standalone program which is working fine:

String url = "jdbc:postgresql://localhost:5432/test";
Properties props = new Properties();
props.setProperty("user","test");
props.setProperty("password","test123");
props.setProperty("ssl","true");
props.setProperty("sslfactory","org.postgresql.ssl.NonValidatingFactory");
Connection conn = DriverManager.getConnection(url, props);

stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select now()");
if (rs.next()) {
System.out.println(rs.getString(1));
}
rs.close();
stmt.close();
conn.close();

Regards,
Satish.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Craig Ringer 2010-03-28 00:53:13 Re: org.postgresql.util.PSQLException: ERROR: relation "dual" does not exist Position: 42
Previous Message Sriram P 2010-03-27 08:19:12 org.postgresql.util.PSQLException: ERROR: relation "dual" does not exist Position: 42