JDCConnection.java complilation error
843854Jan 18 2004 — edited Aug 31 2005I recently downloaded the JDCBook.zip "Writing Advanced Applications for the JavaTM Platform
By Calvin Austin and Monica Pawlan" for the connectin pooling section.
In one of the file JDCConnection.java:
package pool;
import java.sql.*;
import java.util.*;
import java.io.*;
public class JDCConnection implements Connection {
private JDCConnectionPool pool;
private Connection conn;
private boolean inuse;
private long timestamp;
public JDCConnection(Connection conn, JDCConnectionPool pool) {
this.conn=conn;
this.pool=pool;
this.inuse=false;
this.timestamp=0;
}
public synchronized boolean lease() {
if(inuse) {
return false;
} else {
inuse=true;
timestamp=System.currentTimeMillis();
return true;
}
......etc
I get the following error message when trying to compile. Does anyone know what this means and what to do?
pool/JDCConnection.java [7:1] pool.JDCConnection is not abstract and does not override abstract method prepareStatement(java.lang.String,java.lang.String[]) in java.sql.Connection
public class JDCConnection implements Connection {
Thanks. Vang