This class represents a cache of prepared statements corresponding to
one SQL statement. Instance of this class automatically prepares new
instance if no free statements are
- Roman Rokytskyy
Create instance of this class for the specified SQL statement and
result set type and concurrency.
owner instance of
that will prepare
key key of the prepared statement.
maxSize maximum pool size.
Reference prepared statement. This method checks prepared statement out
of the pool. If no free statement is available, it prepares new one.
"This reference guard was already destroyed.");
"Found no free prepared statements, " +
"Found free prepared statement in pool.");
throw new SQLException("Cannot prepare SQL statement in pool");
Prepare the SQL statement. This method checks the type of the statement
(i.e. whether generated keys should be returned or not).
Dereference object. If
is the same as guarded
object, counter is simply decreased, otherwise exception is thrown.
Invalidate this pool. After invoking this method no other
method can be invoked.