diff options
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java')
-rw-r--r-- | src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java index 45d18c5cb1..71f8a098bd 100644 --- a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java +++ b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2Connection.java @@ -6,7 +6,7 @@ import java.net.ConnectException; import java.sql.*; import org.postgresql.util.PSQLException; -/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Connection.java,v 1.3 2003/02/04 09:20:10 barry Exp $ +/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2Connection.java,v 1.4 2003/03/07 18:39:44 barry Exp $ * This class defines methods of the jdbc2 specification. This class extends * org.postgresql.jdbc1.AbstractJdbc1Connection which provides the jdbc1 * methods. The real Connection class (for jdbc2) is org.postgresql.jdbc2.Jdbc2Connection @@ -52,51 +52,6 @@ public abstract class AbstractJdbc2Connection extends org.postgresql.jdbc1.Abstr typemap = map; } - public void cancelQuery() throws SQLException - { - org.postgresql.PG_Stream cancelStream = null; - try - { - cancelStream = new org.postgresql.PG_Stream(PG_HOST, PG_PORT); - } - catch (ConnectException cex) - { - // Added by Peter Mount <peter@retep.org.uk> - // ConnectException is thrown when the connection cannot be made. - // we trap this an return a more meaningful message for the end user - throw new PSQLException ("postgresql.con.refused"); - } - catch (IOException e) - { - throw new PSQLException ("postgresql.con.failed", e); - } - - // Now we need to construct and send a cancel packet - try - { - cancelStream.SendInteger(16, 4); - cancelStream.SendInteger(80877102, 4); - cancelStream.SendInteger(pid, 4); - cancelStream.SendInteger(ckey, 4); - cancelStream.flush(); - } - catch (IOException e) - { - throw new PSQLException("postgresql.con.failed", e); - } - finally - { - try - { - if (cancelStream != null) - cancelStream.close(); - } - catch (IOException e) - {} // Ignore - } - } - - /* * This overides the standard internal getObject method so that we can * check the jdbc2 type map first |