|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines values for different heuristic decisions. During prepare, commit and rollback the transaction manager will reach certain heuristic decisions regarding the transaction and its resources.
If the transaction involves no resources, the heuristic decision will be that the transaction is read-only and does not need commit or rollback. If the transaction has been marked for roll back, the heuristic decision will be to roll back the transaction. Otherwise, if the transaction is being commited the heuristic decision is to commit the transaction.
During prepare/commit/rollback, certain resources may not respond properly and the heuristic decision about the transaction might change. For example, attempting to commit a transaction that has one resource that fails to prepare will change it's heuristic decision to rollback.
In the event that two resources made conflicting decisions, the heuristic decision will be mixed. This will cause the transaction to attempt and roll back as many remaining resources as possible.
The heuristic outcome is made of a combination of any number of flags, with certain flags taking precedence over others:
READONLY
COMMIT
ROLLBACK
MIXED
flag set, or both the COMMIT
and ROLLBACK
flags set
HAZARD
flag set
Transaction
,
TransactionImpl#normalize
Field Summary | |
static int |
COMMIT
Indicates that all resources in the transaction (at least one, excluding any read-only) have agreed to commit during the preparation stage and the transaction could be commited in its entirety. |
static int |
HAZARD
Indicates that resources have commited, or resources have rolled back, but we don't know what was the exact outcome. |
static int |
MIXED
Indicates that some resources have commited and others have rolledback, the transaction should be rolled back as much as possible, but could not definitely be rolled back. |
static int |
OTHER
Indicates that an other type of heuristic response, not ReadOnly, Commit, Rollback, Mixed or Hazard, occurred during the transaction. |
static int |
READONLY
Indicates that the transaction has no resources or has only read-only resources. |
static int |
ROLLBACK
Indicates that one or more resources in the transaction (excluding read-only) could not be prepared or that an error marks this transaction as faulty. |
static int |
TIMEOUT
Transaction has been timed out and has been rolled back. |
Field Detail |
public static final int READONLY
public static final int COMMIT
public static final int ROLLBACK
public static final int MIXED
public static final int HAZARD
public static final int TIMEOUT
public static final int OTHER
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |