Class StatementFinalizer.StatementEntry
java.lang.Object
org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer.StatementEntry
- Enclosing class:
StatementFinalizer
Entry that tracks a statement and its allocation stack. The statement is held strongly: it must stay closeable
until the application or the connection return disposes of it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclose()Closes the tracked statement unless the driver reports it closed already and, with tracing on, reports a statement the application left open.Returns the stack trace from when this statement was created.Returns the tracked statement.
-
Constructor Details
-
StatementEntry
Creates a new StatementEntry.- Parameters:
statement- the statement to track
-
-
Method Details
-
getStatement
-
getAllocationStack
Returns the stack trace from when this statement was created.- Returns:
- the allocation stack trace, or null if tracing is disabled
-
close
public boolean close()Closes the tracked statement unless the driver reports it closed already and, with tracing on, reports a statement the application left open.- Returns:
trueif the statement is closed - because it was found closed or because the close succeeded;falseif an attempted close failed and the statement may still be open
-