Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDCConnection.java complilation error

843854Jan 18 2004 — edited Aug 31 2005
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2005
Added on Jan 18 2004
3 comments
158 views