public enum TransactionMode extends Enum<TransactionMode>
Enum Constant and Description |
---|
AUTO
The default transaction mode.
|
MANAGED
Managed transaction environment with JTA e.g.
|
NONE
Transactions are disabled.
|
Modifier and Type | Method and Description |
---|---|
static TransactionMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TransactionMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TransactionMode NONE
Connection.setAutoCommit(boolean)
is set to true.public static final TransactionMode MANAGED
Connection.commit()
and
Connection.rollback()
are NOT used. Transaction is optionally started as a
UserTransaction
status of the transaction is tracked with
Synchronization
public static final TransactionMode AUTO
Connection.commit()
and Connection.rollback()
.public static TransactionMode[] values()
for (TransactionMode c : TransactionMode.values()) System.out.println(c);
public static TransactionMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null