public class ConnectionProxyXA extends AbstractConnectionProxyXA implements Holdable
originalConnection, resource, SQLSTATE_XA_NOT_END, xaConnection, xaResource, xidTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
ConnectionProxyXA(Connection originalConnection,
XAConnection xaConnection,
BaseDataSourceResource resource,
String xid)
Constructor of Connection Proxy for XA mode.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
closeForce() |
void |
commit() |
boolean |
getAutoCommit() |
Long |
getPrepareTime() |
void |
init() |
boolean |
isHeld() |
void |
rollback() |
void |
setAutoCommit(boolean autoCommit) |
void |
setHeld(boolean kept) |
boolean |
shouldBeHeld() |
void |
xaCommit(String xid,
long branchId,
String applicationData)
XA commit
|
void |
xaRollback(String xid,
long branchId,
String applicationData)
XA rollback
|
void |
xaRollback(XAXid xaXid)
XA rollback
|
abort, clearWarnings, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTransactionIsolation, getTypeMap, getWarnings, getWrappedConnection, getWrappedXAConnection, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, unwrappublic ConnectionProxyXA(Connection originalConnection, XAConnection xaConnection, BaseDataSourceResource resource, String xid)
originalConnection - Normal Connection from the original DataSource.xaConnection - XA Connection based on physical connection of the normal Connection above.resource - The corresponding Resource(DataSource proxy) from which the connections was created.xid - Seata global transaction xid.public void init()
public void xaCommit(String xid, long branchId, String applicationData) throws XAException
xid - global transaction xidbranchId - transaction branch idapplicationData - application dataSQLException - SQLExceptionXAExceptionpublic void xaRollback(String xid, long branchId, String applicationData) throws XAException
xid - global transaction xidbranchId - transaction branch idapplicationData - application dataXAExceptionpublic void xaRollback(XAXid xaXid) throws XAException
xaXid - xaXidXAException - XAExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionSQLExceptionpublic boolean getAutoCommit()
throws SQLException
getAutoCommit in interface ConnectionSQLExceptionpublic void commit()
throws SQLException
commit in interface ConnectionSQLExceptionpublic void rollback()
throws SQLException
rollback in interface ConnectionSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface ConnectionSQLExceptionprotected void closeForce()
throws SQLException
SQLExceptionpublic boolean shouldBeHeld()
shouldBeHeld in interface Holdablepublic Long getPrepareTime()
Copyright © 2024 Apache. All rights reserved.