Subject | How is statement pooling working ? (2nd try) |
---|---|
Author | Carsten Schäfer |
Post date | 2004-08-05T13:11:48Z |
Hi,
my question:
Is the PreparedStatement in the following code somehow reused ?
while(true) {
Connection con = getConnection(); // gets a connection from Pool.
PreparedStatement ps = con.prepareStatement(some_sql);
ps.setInt(1,1);
ps.execute();
con close();
}
If not, can someone please give examples for using statement-pooling.
mfg
Carsten
my question:
Is the PreparedStatement in the following code somehow reused ?
while(true) {
Connection con = getConnection(); // gets a connection from Pool.
PreparedStatement ps = con.prepareStatement(some_sql);
ps.setInt(1,1);
ps.execute();
con close();
}
If not, can someone please give examples for using statement-pooling.
mfg
Carsten