| 481 | } |
| 482 | |
| 483 | DTransaction* DTransaction::enterDtc(CheckStatusWrapper* status) |
| 484 | { |
| 485 | try |
| 486 | { |
| 487 | status->init(); |
| 488 | |
| 489 | WriteLockGuard guard(rwLock, FB_FUNCTION); |
| 490 | |
| 491 | RefPtr<DTransaction> traCopy(FB_NEW DTransaction(sub)); |
| 492 | sub.clear(); |
| 493 | release(); |
| 494 | |
| 495 | traCopy->addRef(); |
| 496 | return traCopy; |
| 497 | } |
| 498 | catch (const Exception& ex) |
| 499 | { |
| 500 | ex.stuffException(status); |
| 501 | } |
| 502 | |
| 503 | return NULL; |
| 504 | } |
| 505 | |
| 506 | DTransaction::~DTransaction() |
| 507 | { |