| 68 | { } |
| 69 | |
| 70 | ~App() |
| 71 | { |
| 72 | if (tra) |
| 73 | { |
| 74 | tra->rollback(status); |
| 75 | if (status->getState() & IStatus::STATE_ERRORS) |
| 76 | { |
| 77 | print("rollback"); |
| 78 | tra->release(); |
| 79 | } |
| 80 | } |
| 81 | if (att) |
| 82 | { |
| 83 | att->detach(status); |
| 84 | if (status->getState() & IStatus::STATE_ERRORS) |
| 85 | { |
| 86 | print("detach"); |
| 87 | att->release(); |
| 88 | } |
| 89 | } |
| 90 | if (p) |
| 91 | { |
| 92 | p->release(); |
| 93 | } |
| 94 | status->dispose(); |
| 95 | } |
| 96 | |
| 97 | enum Action {NONE, ENC, DEC, EX_LCL, EX_RMT}; |
| 98 | // Switches/actions have the following meanings: |