class EmbedXAConnection extends EmbedPooledConnection implements javax.sql.XAConnection
| Modifier and Type | Field and Description |
|---|---|
private EmbedXAResource |
xaRes |
currentConnectionHandle, dataSource, defaultIsolationLevel, isActive, realConnection| Constructor and Description |
|---|
EmbedXAConnection(EmbeddedBaseDataSource ds,
ResourceAdapter ra,
java.lang.String u,
java.lang.String p,
boolean requestPassword) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkAutoCommit(boolean autoCommit)
Allow control over setting auto commit mode.
|
void |
checkClose()
Check if the brokered connection can be closed.
|
void |
checkCommit()
Allow control over calling commit.
|
int |
checkHoldCursors(int holdability,
boolean downgrade)
Are held cursors allowed.
|
void |
checkRollback()
Allow control over calling rollback.
|
void |
checkSavepoint()
Allow control over creating a Savepoint (JDBC 3.0)
|
java.sql.Connection |
getConnection()
Create an object handle for a database connection.
|
EngineConnection |
getRealConnection()
Override getRealConnection to create a a local connection
when we are not associated with an XA transaction.
|
javax.transaction.xa.XAResource |
getXAResource() |
private boolean |
isGlobal()
Check if this connection is part of a global XA transaction.
|
boolean |
isInGlobalTransaction()
Is this a global transaction
|
java.sql.CallableStatement |
wrapStatement(java.sql.CallableStatement cs,
java.lang.String sql)
Wrap and control a PreparedStatement
|
java.sql.PreparedStatement |
wrapStatement(java.sql.PreparedStatement ps,
java.lang.String sql,
java.lang.Object generatedKeys)
Wrap and control a PreparedStatement
|
java.sql.Statement |
wrapStatement(java.sql.Statement s)
Wrap and control a Statement
|
addConnectionEventListener, checkActive, close, closingConnection, getLanguageConnection, getNewCurrentConnectionHandle, getPassword, getUsername, isActive, isIsolationLevelSetUsingSQLorJDBC, notifyError, notifyException, onStatementClose, onStatementErrorOccurred, openRealConnection, removeConnectionEventListener, resetIsolationLevelFlag, resetRealConnection, toStringprivate EmbedXAResource xaRes
EmbedXAConnection(EmbeddedBaseDataSource ds, ResourceAdapter ra, java.lang.String u, java.lang.String p, boolean requestPassword) throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean isInGlobalTransaction()
BrokeredConnectionControlisInGlobalTransaction in interface BrokeredConnectionControlisInGlobalTransaction in class EmbedPooledConnectionBrokeredConnectionControl.isInGlobalTransaction()private boolean isGlobal()
true if the transaction is global, false if the
transaction is localpublic final javax.transaction.xa.XAResource getXAResource()
throws java.sql.SQLException
getXAResource in interface javax.sql.XAConnectionjava.sql.SQLExceptionpublic void checkAutoCommit(boolean autoCommit)
throws java.sql.SQLException
checkAutoCommit in interface BrokeredConnectionControlcheckAutoCommit in class EmbedPooledConnectionjava.sql.SQLExceptionpublic int checkHoldCursors(int holdability,
boolean downgrade)
throws java.sql.SQLException
checkHoldCursors in interface BrokeredConnectionControlcheckHoldCursors in class EmbedPooledConnectiondowngrade - true to downgrade the holdability,
false to throw an exception.java.sql.SQLExceptionpublic void checkSavepoint()
throws java.sql.SQLException
checkSavepoint in interface BrokeredConnectionControlcheckSavepoint in class EmbedPooledConnectionjava.sql.SQLExceptionpublic void checkRollback()
throws java.sql.SQLException
checkRollback in interface BrokeredConnectionControlcheckRollback in class EmbedPooledConnectionjava.sql.SQLExceptionpublic void checkCommit()
throws java.sql.SQLException
checkCommit in interface BrokeredConnectionControlcheckCommit in class EmbedPooledConnectionjava.sql.SQLExceptionpublic void checkClose()
throws java.sql.SQLException
BrokeredConnectionControlcheckClose in interface BrokeredConnectionControlcheckClose in class EmbedPooledConnectionjava.sql.SQLException - if it is not allowed to call close on the brokered
connectionBrokeredConnectionControl.checkClose()public java.sql.Connection getConnection()
throws java.sql.SQLException
EmbedPooledConnectiongetConnection in interface javax.sql.PooledConnectiongetConnection in class EmbedPooledConnectionjava.sql.SQLException - - if a database-access error occurs.public java.sql.Statement wrapStatement(java.sql.Statement s)
throws java.sql.SQLException
wrapStatement in interface BrokeredConnectionControlwrapStatement in class EmbedPooledConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement wrapStatement(java.sql.PreparedStatement ps,
java.lang.String sql,
java.lang.Object generatedKeys)
throws java.sql.SQLException
wrapStatement in interface BrokeredConnectionControlwrapStatement in class EmbedPooledConnectionps - PreparedStatment to be wrappedsql - StringgeneratedKeys - Objectjava.sql.SQLExceptionpublic java.sql.CallableStatement wrapStatement(java.sql.CallableStatement cs,
java.lang.String sql)
throws java.sql.SQLException
wrapStatement in interface BrokeredConnectionControlwrapStatement in class EmbedPooledConnectioncs - CallableStatment to be wrappedsql - Stringjava.sql.SQLExceptionpublic EngineConnection getRealConnection() throws java.sql.SQLException
getRealConnection in interface BrokeredConnectionControlgetRealConnection in class EmbedPooledConnectionjava.sql.SQLExceptionApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.