posted 23 years ago
I would like to create a class for pooling my connection to my oracle database
I have generated a factory Class named 'ConnectionPool'
public class ConnectionPool {
static Pool p = new Pool();
public ConnectionPool() {
super();
}
}
which will create an Object of the 'Pool' Class and then
I have used this Object to retreive my connection.
The 'Pool' class is as follows
public class Pool {
static Connect1 c = new Connect1();
static Connection con;
public Pool()
{
con = c.connectToOracle();
}
}
The Connect1 class is working fine and returning a valid connection to me.
I would like you to Go through the code and Suggest me enhancements. I also want to create say 20 Connections and use them one after the other. (In the above program there is only one Connection and I'm just pasiing the refernce to my utility programs.)
Please do help
Thanks in advance
C Balajee