Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id EBDEB633076 for ; Sat, 27 Mar 2010 16:20:29 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 81500-02 for ; Sat, 27 Mar 2010 19:20:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pv0-f174.google.com (mail-pv0-f174.google.com [74.125.83.174]) by mail.postgresql.org (Postfix) with ESMTP id 15BCB632EA1 for ; Sat, 27 Mar 2010 16:20:15 -0300 (ADT) Received: by pva18 with SMTP id 18so1928215pva.19 for ; Sat, 27 Mar 2010 12:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=J5udUlzlkCIVpesAtHIwaHLXS8wJE/knTRDPUTk8rxU=; b=A23pCPfHBVqKz7N6Wt+tghKAyVb5LbH7LgYN7UkoEbxTMmGBQLOZ43Q1ut8BRIQ2w7 lKeoVa2GY0hiIT017R89Xt5sApcAJap6WXtI69ovnvmRsJyuFmycMjHVNsIsLzwH7++O MAbQ52ERypyynkuKGXrOshkIeLgwrxB1rPXio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HKMdswwHHvFZsReDJks5/8cOnWj2E7htQ3y5SEtOZgbLqeh/esddUzLu+XBA3/f2zj 1VYC2cdxRcpmri29+5pRPaJIT0ey0yo3OFqvquOzN6kt6fsiQLXKxSnOAs3hMAGPB5AC /iHSnnz/bL529rjaIZS8JooMK7g5knkcjW6RI= MIME-Version: 1.0 Received: by 10.142.113.6 with HTTP; Sat, 27 Mar 2010 12:20:14 -0700 (PDT) Date: Sat, 27 Mar 2010 14:20:14 -0500 Received: by 10.142.67.35 with SMTP id p35mr1150629wfa.203.1269717614667; Sat, 27 Mar 2010 12:20:14 -0700 (PDT) Message-ID: Subject: Glassfish ignoring "ssl" property in connection pool of PostgreSQL From: Nookala Satish Kumar To: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=001636e0a8f26326fa0482cd2bba X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.739 tagged_above=-10 required=5 tests=BAYES_20=-0.74, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/69 X-Sequence-Number: 20409 --001636e0a8f26326fa0482cd2bba Content-Type: text/plain; charset=ISO-8859-1 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. --001636e0a8f26326fa0482cd2bba Content-Type: text/html; charset=ISO-8859-1 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.

--001636e0a8f26326fa0482cd2bba--