|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.pool.PooledPreparedStatementHandler
public class PooledPreparedStatementHandler
Wrapper for prepared statements. This invocation handler notifies statement manager about closing prepared statement.
| Method Summary | |
|---|---|
protected void |
checkCorrectness(Method method)
Check if method call is correct. |
static Method |
findMethod(Class clazz,
String name,
Class[] params)
|
protected void |
handleForceClose()
|
protected boolean |
handleIsCached()
|
protected void |
handleStatementClose(String statement,
Object proxy)
Handle Statement.close() call. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Invoke method on a specified proxy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Method findMethod(Class clazz,
String name,
Class[] params)
protected void handleStatementClose(String statement,
Object proxy)
throws SQLException
Statement.close() call.
statement - SQL statement corresponding to the wrapped prepared
statement.proxy - dynamic proxy wrapping prepared statement.
SQLException - if something went wrong.
protected void handleForceClose()
throws SQLException
SQLException
protected boolean handleIsCached()
throws SQLException
SQLException
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
method
is a method Statement.close(). If yes, we notify owner
that this prepared statement was closed.
invoke in interface InvocationHandlerproxy - proxy on which method is invoked.method - instance of Method describing method being invoked.args - array with arguments.
Throwable - if invoked method threw an exception.
protected void checkCorrectness(Method method)
throws SQLException
PreparedStatement class and there is no connection proxy
associated with this statement (i.e. statement in in pool), exception is
thrown (this situation usually happens if somebody tries to call method
on prepared statement after it has been closed).
method - method to check.
SQLException - if statement has incorrect statement.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||