From: | Michael Barker <mike(at)middlesoft(dot)co(dot)uk> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Cc: | Andy Oliver <acoliver(at)jboss(dot)org> |
Subject: | [PATCH] Support for ping method. |
Date: | 2006-04-06 06:38:49 |
Message-ID: | 1144305529.2955.11.camel@corona |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
Attached is a patch that adds support for a ping method on the
AbstractJdbc2Connection. This is useful for JBoss (and other
containers) where the container needs to check if the connection is
alive before passing it to the caller. Currently JBoss does a "SELECT
1", but using the new ping method there is a boost in performance.
Opening and closing 1000 connections from a datasource:
PGTest1 (SELECT 1) 1000 iterations: 2491ms
PGTest2 (ping()) 1000 iterations: 63ms
All is does is send a sendSync and wait for a valid response.
Regards,
Michael Barker.
Attachment | Content-Type | Size |
---|---|---|
ping_patch | text/plain | 5.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Verkoyen | 2006-04-06 08:04:17 | Re: do XA connections support SSL? |
Previous Message | markds75 | 2006-04-06 01:26:06 | Re: PostgreSQL (XADataSource) as Tomcat Resource |