private static enum PGXAConnection.State extends java.lang.Enum<PGXAConnection.State>
Enum Constant and Description |
---|
ACTIVE
PGXAConnection.start(Xid, int) has been called, and we're associated with an XA transaction. |
ENDED
PGXAConnection.end(Xid, int) has been called, but the transaction has not yet been prepared. |
IDLE
PGXAConnection not associated with a XA-transaction. |
Modifier and Type | Method and Description |
---|---|
static PGXAConnection.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static PGXAConnection.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PGXAConnection.State IDLE
PGXAConnection
not associated with a XA-transaction. You can still call PGXAConnection.getConnection()
and
use the connection outside XA. currentXid
is null
. autoCommit is true
on a connection
by getConnection, per normal JDBC rules, though the caller can change it to false
and manage
transactions itself using Connection.commit and rollback.public static final PGXAConnection.State ACTIVE
PGXAConnection.start(Xid, int)
has been called, and we're associated with an XA transaction. currentXid
is valid. autoCommit is false on a connection returned by getConnection, and should not be messed with by
the caller or the XA transaction will be broken.public static final PGXAConnection.State ENDED
PGXAConnection.end(Xid, int)
has been called, but the transaction has not yet been prepared. currentXid
is still valid. You shouldn't use the connection for anything else than issuing a XAResource.commit(Xid, boolean)
or
rollback.public static PGXAConnection.State[] values()
for (PGXAConnection.State c : PGXAConnection.State.values()) System.out.println(c);
public static PGXAConnection.State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null