|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Subtransaction
Subtransaction interface. Usage example:
Subtransaction sub = session.openSubtrans();
try {
// do a number of operations
...
// as a last step, do commit to confirm the changes
sub.commit();
} finally {
// release subtrans, which rolls back the changes, unless
// commit confirmed the changes
sub.release();
}
This pattern will make all the operations within try/finally atomic.
When an error occurs, the subtransaction will be rolled back, otherwise
it will be committed.
| Method Summary | |
|---|---|
void |
commit()
Mark the subtransaction for commit. |
void |
release()
Release the subtransaction. |
| Method Detail |
|---|
void commit()
release()void release()
commit()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||