EntityManager#getTransaction method returns
the EntityTransaction interface.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public boolean | Returns: boolean indicating whether the transaction has been marked for rollbackDetermine whether the current resource transaction has been marked for rollback. |
| public Integer | |
| public boolean | Returns: boolean indicating whether transaction is in progressIndicate whether a resource transaction is in progress. |
| public void | |
| public void | setRollbackOnly()
Mark the current resource transaction so that the only possible outcome of the transaction is for the transaction to be rolled back. |
| public void | setTimeout(Integer
the timeout, in seconds, or null to indicate
that the database server should set the timeout timeout)Set the transaction timeout, in seconds. |
| begin | back to summary |
|---|---|
| public void begin() Start a resource transaction.
| |
| commit | back to summary |
|---|---|
| public void commit() Commit the current resource transaction, writing any unflushed changes to the database.
| |
| getRollbackOnly | back to summary |
|---|---|
| public boolean getRollbackOnly() Determine whether the current resource transaction has been marked for rollback.
| |
| getTimeout | back to summary |
|---|---|
| public Integer getTimeout() The transaction timeout.
| |
| isActive | back to summary |
|---|---|
| public boolean isActive() Indicate whether a resource transaction is in progress.
| |
| rollback | back to summary |
|---|---|
| public void rollback() Roll back the current resource transaction.
| |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() Mark the current resource transaction so that the only possible outcome of the transaction is for the transaction to be rolled back.
| |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(Integer timeout) Set the transaction timeout, in seconds. This is a hint.
| |