| 4701 | |
| 4702 | |
| 4703 | JTransaction* JAttachment::startTransaction(CheckStatusWrapper* user_status, |
| 4704 | unsigned int tpbLength, const unsigned char* tpb) |
| 4705 | { |
| 4706 | /************************************** |
| 4707 | * |
| 4708 | * g d s _ $ s t a r t _ t r a n s a c t i o n |
| 4709 | * |
| 4710 | ************************************** |
| 4711 | * |
| 4712 | * Functional description |
| 4713 | * Start a transaction. |
| 4714 | * |
| 4715 | **************************************/ |
| 4716 | jrd_tra* tra = NULL; |
| 4717 | |
| 4718 | try |
| 4719 | { |
| 4720 | EngineContextHolder tdbb(user_status, this, FB_FUNCTION); |
| 4721 | check_database(tdbb); |
| 4722 | |
| 4723 | start_transaction(tdbb, true, &tra, getHandle(), tpbLength, tpb); |
| 4724 | } |
| 4725 | catch (const Exception& ex) |
| 4726 | { |
| 4727 | ex.stuffException(user_status); |
| 4728 | return NULL; |
| 4729 | } |
| 4730 | |
| 4731 | successful_completion(user_status); |
| 4732 | |
| 4733 | JTransaction* jt = tra->getInterface(false); |
| 4734 | |
| 4735 | if (jt) |
| 4736 | tra->tra_flags &= ~TRA_own_interface; |
| 4737 | else |
| 4738 | { |
| 4739 | jt = FB_NEW JTransaction(tra, getStable()); |
| 4740 | tra->setInterface(jt); |
| 4741 | jt->addRef(); |
| 4742 | } |
| 4743 | |
| 4744 | return jt; |
| 4745 | } |
| 4746 | |
| 4747 | |
| 4748 | void JAttachment::transactRequest(CheckStatusWrapper* user_status, ITransaction* tra, |
no test coverage detected