|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hsqldb.jdbc.JDBCConnection
org.hsqldb.jdbc.pool.JDBCXAConnectionWrapper
public class JDBCXAConnectionWrapper
This is a wrapper class for JDBCConnection objects (not java.sql.XAConnection objects). Purpose of this class is to intercept and handle XA-related operations according to chapter 12 of the JDBC 3.0 specification, by returning this wrapped JDBCConnection to end-users. Global transaction services and XAResources will not use this wrapper.
The new implementation extends JDBCConnection. A new object is created based on the session / session proxy of the JDBCXAConnection object in the constructor. (fredt)
JDBCConnection
Field Summary |
---|
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
---|---|
JDBCXAConnectionWrapper(JDBCXAResource xaResource,
JDBCXAConnection xaConnection,
JDBCConnection databaseConnection)
|
Method Summary | |
---|---|
void |
commit()
Interceptor method, because this method is prohibited within any global transaction. |
void |
rollback()
Interceptor method, because this method is prohibited within any global transaction. |
void |
rollback(Savepoint savepoint)
Interceptor method, because this method is prohibited within any global transaction. |
void |
setAutoCommit(boolean autoCommit)
Interceptor method, because this method is prohibited within any global transaction. |
Savepoint |
setSavepoint()
Interceptor method, because this method is prohibited within any global transaction. |
Savepoint |
setSavepoint(String name)
Interceptor method, because this method is prohibited within any global transaction. |
void |
setTransactionIsolation(int level)
Interceptor method, because there may be XA implications to calling the method within a global transaction. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDBCXAConnectionWrapper(JDBCXAResource xaResource, JDBCXAConnection xaConnection, JDBCConnection databaseConnection) throws SQLException
SQLException
Method Detail |
---|
public void setAutoCommit(boolean autoCommit) throws SQLException
setAutoCommit
in interface Connection
setAutoCommit
in class JDBCConnection
autoCommit
-
SQLException
- on errorJDBCConnection.getAutoCommit()
public void commit() throws SQLException
commit
in interface Connection
commit
in class JDBCConnection
SQLException
- on errorJDBCConnection.setAutoCommit(boolean)
public void rollback() throws SQLException
rollback
in interface Connection
rollback
in class JDBCConnection
SQLException
- on errorJDBCConnection.setAutoCommit(boolean)
public void rollback(Savepoint savepoint) throws SQLException
rollback
in interface Connection
rollback
in class JDBCConnection
savepoint
- the Savepoint
object to roll back to
SQLException
- on errorJDBCSavepoint
,
Savepoint
,
JDBCConnection.rollback()
public Savepoint setSavepoint() throws SQLException
setSavepoint
in interface Connection
setSavepoint
in class JDBCConnection
Savepoint
object
SQLException
- on errorJDBCSavepoint
,
Savepoint
public Savepoint setSavepoint(String name) throws SQLException
setSavepoint
in interface Connection
setSavepoint
in class JDBCConnection
name
- a String
containing the name of the savepoint
Savepoint
object
SQLException
- if a database access error occurs,
(JDBC4 Clarification:)
this method is called while participating in a distributed transaction,
this method is called on a closed connection
or this Connection
object is currently in
auto-commit mode
SQLFeatureNotSupportedException
- if the JDBC driver does not support
this methodJDBCSavepoint
,
Savepoint
public void setTransactionIsolation(int level) throws SQLException
HSQLDB does not allow changing the isolation level inside a transaction of any kind.
setTransactionIsolation
in interface Connection
setTransactionIsolation
in class JDBCConnection
level
- isolation level
SQLException
- if a database access error occurs, this
(JDBC4 Clarification:)
method is called on a closed connection
(:JDBC4 End Clarification)
or the given parameter is not one of the Connection
constantsJDBCDatabaseMetaData.supportsTransactionIsolationLevel(int)
,
JDBCConnection.getTransactionIsolation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |