パッケージ org.postgresql.xa
クラス PGXAConnection
java.lang.Object
org.postgresql.ds.PGPooledConnection
org.postgresql.xa.PGXAConnection
- すべての実装されたインタフェース:
PooledConnection
,XAConnection
,XAResource
The PostgreSQL implementation of XAResource
.
This implementation doesn't support transaction interleaving (see JTA specification, section 3.4.4) and suspend/resume.
Two-phase commit requires PostgreSQL server version 8.1 or higher.
-
フィールドの概要
インタフェースから継承されたフィールド javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明void
void
Preconditions:void
Does nothing, since we don't do heuristics.XAConnection interface.int
We don't do transaction timeouts.boolean
isSameRM
(XAResource xares) int
Prepares transaction.Xid[]
recover
(int flag) Recovers transaction.void
Preconditions:boolean
setTransactionTimeout
(int seconds) We don't do transaction timeouts.void
Preconditions:クラスから継承されたメソッド org.postgresql.ds.PGPooledConnection
addConnectionEventListener, addStatementEventListener, close, createConnectionEvent, removeConnectionEventListener, removeStatementEventListener
クラスから継承されたメソッド java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インタフェースから継承されたメソッド javax.sql.PooledConnection
addConnectionEventListener, addStatementEventListener, close, removeConnectionEventListener, removeStatementEventListener
-
コンストラクタの詳細
-
PGXAConnection
- 例外:
SQLException
-
-
メソッドの詳細
-
getConnection
XAConnection interface.- 定義:
getConnection
インタフェース内PooledConnection
- オーバーライド:
getConnection
クラス内PGPooledConnection
- 例外:
SQLException
-
getXAResource
- 定義:
getXAResource
インタフェース内XAConnection
-
start
Preconditions:
- Flags must be one of TMNOFLAGS, TMRESUME or TMJOIN
- xid != null
- Connection must not be associated with a transaction
- The TM hasn't seen the xid before
Implementation deficiency preconditions:
- TMRESUME not supported.
- If flags is TMJOIN, we must be in ended state, and xid must be the current transaction
- Unless flags is TMJOIN, previous transaction using the connection must be committed or prepared or rolled back
Postconditions:
- Connection is associated with the transaction
- 定義:
start
インタフェース内XAResource
- 例外:
XAException
-
end
Preconditions:
- Flags is one of TMSUCCESS, TMFAIL, TMSUSPEND
- xid != null
- Connection is associated with transaction xid
Implementation deficiency preconditions:
- Flags is not TMSUSPEND
Postconditions:
- Connection is disassociated from the transaction.
- 定義:
end
インタフェース内XAResource
- 例外:
XAException
-
prepare
Prepares transaction. Preconditions:
- xid != null
- xid is in ended state
Implementation deficiency preconditions:
- xid was associated with this connection
Postconditions:
- Transaction is prepared
- 定義:
prepare
インタフェース内XAResource
- 例外:
XAException
-
recover
Recovers transaction. Preconditions:
- flag must be one of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS or TMSTARTTRSCAN | TMENDRSCAN
- If flag isn't TMSTARTRSCAN or TMSTARTRSCAN | TMENDRSCAN, a recovery scan must be in progress
Postconditions:
- list of prepared xids is returned
- 定義:
recover
インタフェース内XAResource
- 例外:
XAException
-
rollback
Preconditions:
- xid is known to the RM or it's in prepared state
Implementation deficiency preconditions:
- xid must be associated with this connection if it's not in prepared state.
Postconditions:
- Transaction is rolled back and disassociated from connection
- 定義:
rollback
インタフェース内XAResource
- 例外:
XAException
-
commit
- 定義:
commit
インタフェース内XAResource
- 例外:
XAException
-
isSameRM
- 定義:
isSameRM
インタフェース内XAResource
- 例外:
XAException
-
forget
Does nothing, since we don't do heuristics.- 定義:
forget
インタフェース内XAResource
- 例外:
XAException
-
getTransactionTimeout
public int getTransactionTimeout()We don't do transaction timeouts. Just returns 0.- 定義:
getTransactionTimeout
インタフェース内XAResource
-
setTransactionTimeout
public boolean setTransactionTimeout(int seconds) We don't do transaction timeouts. Returns false.- 定義:
setTransactionTimeout
インタフェース内XAResource
-