public class EntityTransactionImpl
extends java.lang.Object
implements javax.persistence.EntityTransaction
EntityTransactionImpl| Modifier and Type | Field and Description |
|---|---|
static boolean |
isFinalizedRequired
PERF: Avoid finalization if not required by the application, and finalizers have major concurrency affects.
|
| Constructor and Description |
|---|
EntityTransactionImpl(EntityTransactionWrapper wrapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
addOpenQuery(QueryImpl query)
Queries that leave the connection and are executed against this entity
manager will be added here.
|
void |
begin()
Start the current transaction.
|
void |
commit()
Commit the current transaction, writing any un-flushed changes to the
database.
|
boolean |
getRollbackOnly()
Determine whether the current transaction has been marked for rollback.
|
boolean |
isActive()
Check to see if the current transaction is in progress.
|
void |
rollback()
Roll back the current transaction, discarding any changes that have
happened in this transaction.
|
void |
setRollbackOnly()
Mark the current transaction so that the only possible outcome of the
transaction is for the transaction to be rolled back.
|
public static boolean isFinalizedRequired
public EntityTransactionImpl(EntityTransactionWrapper wrapper)
public void addOpenQuery(QueryImpl query)
query - public void begin()
isActive() returns false.begin in interface javax.persistence.EntityTransactionjava.lang.IllegalStateException - if isActive() is true.public void commit()
isActive() returns
true.commit in interface javax.persistence.EntityTransactionjava.lang.IllegalStateException - if isActive() is false.public void rollback()
isActive() returns true.rollback in interface javax.persistence.EntityTransactionjava.lang.IllegalStateException - if isActive() is false.public void setRollbackOnly()
setRollbackOnly in interface javax.persistence.EntityTransactionjava.lang.IllegalStateException - if isActive() is false.public boolean getRollbackOnly()
getRollbackOnly in interface javax.persistence.EntityTransactionjava.lang.IllegalStateException - if isActive() is false.public boolean isActive()
isActive in interface javax.persistence.EntityTransactionEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference