Class XAStatementControl
java.lang.Object
org.apache.derby.jdbc.XAStatementControl
- All Implemented Interfaces:
BrokeredStatementControl
The Statement returned by an Connection returned by a XAConnection
needs to float across the underlying real connections. We do this by implementing
a wrapper statement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BrokeredConnection(package private) BrokeredStatementprivate CallableStatementprivate EmbedConnectionprivate PreparedStatementprivate Statementprivate final EmbedXAConnection -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateXAStatementControl(EmbedXAConnection xaConnection) (package private)XAStatementControl(EmbedXAConnection xaConnection, CallableStatement realCallableStatement, String sql) (package private)XAStatementControl(EmbedXAConnection xaConnection, PreparedStatement realPreparedStatement, String sql, Object generatedKeys) (package private)XAStatementControl(EmbedXAConnection xaConnection, Statement realStatement) -
Method Summary
Modifier and TypeMethodDescriptionintcheckHoldCursors(int holdability) Can cursors be held across commits.voidClose the realCallableStatement within this control.voidClose the realPreparedStatement within this control.voidClose the realStatement within this control.Return the real JDBC CallableStatement for the brokered statement when this is controlling a CallableStatement.Return the real JDBC PreparedStatement for the brokered statement when this is controlling a PreparedStatement.Return the real JDBC statement for the brokered statement when this is controlling a Statement.wrapResultSet(Statement s, ResultSet rs) Don't need to wrap the ResultSet but do need to update its application Statement reference to be the one the application used to create the ResultSet.
-
Field Details
-
xaConnection
-
applicationConnection
-
applicationStatement
BrokeredStatement applicationStatement -
realConnection
-
realStatement
-
realPreparedStatement
-
realCallableStatement
-
-
Constructor Details
-
XAStatementControl
-
XAStatementControl
XAStatementControl(EmbedXAConnection xaConnection, Statement realStatement) throws SQLException - Throws:
SQLException
-
XAStatementControl
XAStatementControl(EmbedXAConnection xaConnection, PreparedStatement realPreparedStatement, String sql, Object generatedKeys) throws SQLException - Throws:
SQLException
-
XAStatementControl
XAStatementControl(EmbedXAConnection xaConnection, CallableStatement realCallableStatement, String sql) throws SQLException - Throws:
SQLException
-
-
Method Details
-
closeRealStatement
Close the realStatement within this control.- Specified by:
closeRealStatementin interfaceBrokeredStatementControl- Throws:
SQLException
-
closeRealCallableStatement
Close the realCallableStatement within this control.- Specified by:
closeRealCallableStatementin interfaceBrokeredStatementControl- Throws:
SQLException
-
closeRealPreparedStatement
Close the realPreparedStatement within this control.- Specified by:
closeRealPreparedStatementin interfaceBrokeredStatementControl- Throws:
SQLException
-
getRealStatement
Description copied from interface:BrokeredStatementControlReturn the real JDBC statement for the brokered statement when this is controlling a Statement.- Specified by:
getRealStatementin interfaceBrokeredStatementControl- Throws:
SQLException
-
getRealPreparedStatement
Description copied from interface:BrokeredStatementControlReturn the real JDBC PreparedStatement for the brokered statement when this is controlling a PreparedStatement.- Specified by:
getRealPreparedStatementin interfaceBrokeredStatementControl- Throws:
SQLException
-
getRealCallableStatement
Description copied from interface:BrokeredStatementControlReturn the real JDBC CallableStatement for the brokered statement when this is controlling a CallableStatement.- Specified by:
getRealCallableStatementin interfaceBrokeredStatementControl- Throws:
SQLException
-
wrapResultSet
Don't need to wrap the ResultSet but do need to update its application Statement reference to be the one the application used to create the ResultSet.- Specified by:
wrapResultSetin interfaceBrokeredStatementControl- Parameters:
s- Statement that created the ResultSet.
-
checkHoldCursors
Can cursors be held across commits.- Specified by:
checkHoldCursorsin interfaceBrokeredStatementControl- Throws:
SQLException
-