Class StatementFacade.StatementProxy
java.lang.Object
org.apache.tomcat.jdbc.pool.StatementFacade.StatementProxy
- All Implemented Interfaces:
InvocationHandler
- Enclosing class:
StatementFacade
Proxy for a SQL statement. Refuses calls once the borrow that created it has ended, and seals every result set
the statement hands back.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ObjectThe pooled connection the statement was created from, as reported byStatement.getConnection().protected ObjectThe delegated statement, nulled once a close has been forwarded.protected final StringThe SQL query text. -
Constructor Summary
ConstructorsConstructorDescriptionStatementProxy(Object parent, String query, Object connection) Constructs a StatementProxy. -
Method Summary
-
Field Details
-
delegate
The delegated statement, nulled once a close has been forwarded. A handle can be closed from a thread other than the one invoking on it, so the field is read by more threads than the one that nulls it and, like the borrow-ended flag, must be volatile to reach them at all. -
query
The SQL query text. -
connection
The pooled connection the statement was created from, as reported byStatement.getConnection(). It is the handle the application borrowed, so it stops working once that borrow has been returned, while the driver's own connection would have gone on serving whoever borrowed the connection next.
-
-
Constructor Details
-
StatementProxy
-
-
Method Details
-
invoke
-
hashCode
-
equals
-
toString
-