From: Nookala Satish Kumar <nosaku@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Glassfish ignoring "ssl" property in connection pool of PostgreSQL
Date: Sat, 27 Mar 2010 14:20:14 -0500
Message-ID: <b613f02a1003271220r59be9d75i5f051e7ded7e1429@mail.gmail.com> (raw)
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.
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: nosaku@gmail.com
Subject: Re: Glassfish ignoring "ssl" property in connection pool of PostgreSQL
In-Reply-To: <b613f02a1003271220r59be9d75i5f051e7ded7e1429@mail.gmail.com>
References: <b613f02a1003271220r59be9d75i5f051e7ded7e1429@mail.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