[Mobies-commit] [commit] r4317 - UDM/trunk/src/UIntWizVS/Templates/1033
ksmyth at redhat3.isis.vanderbilt.edu
ksmyth at redhat3.isis.vanderbilt.edu
Wed Sep 17 12:36:31 CDT 2014
Author: ksmyth
Date: Wed Sep 17 12:36:30 2014
New Revision: 4317
Log:
Interpreter wizard: allow raw COM components to be called while within a transaction (e.g. from another interpeter)
Modified:
UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp
Modified: UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp Wed Sep 17 12:36:26 2014 (r4316)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/RawComponent.cpp Wed Sep 17 12:36:30 2014 (r4317)
@@ -153,7 +153,12 @@
#endif
try
{
- ccpProject->BeginTransactionInNewTerr(TRANSACTION_NON_NESTED); // could also be TRANSACTION_GENERAL
+ bool invokeExStartedATransaction = false;
+ if (!(ccpProject->ProjectStatus & 8))
+ {
+ terr = ccpProject->BeginTransactionInNewTerr(TRANSACTION_NON_NESTED); // could also use TRANSACTION_GENERAL
+ invokeExStartedATransaction = true;
+ }
try
{
// Opening backend
@@ -186,11 +191,13 @@
CUdmApp::UdmMain(&dngBackend,currentObject,selectedObjects,param);
// Closing backend
dngBackend.CloseWithUpdate();
- ccpProject->CommitTransaction();
+ if (invokeExStartedATransaction)
+ ccpProject->CommitTransaction();
}
catch (...)
{
- ccpProject->raw_AbortTransaction();
+ if (invokeExStartedATransaction)
+ ccpProject->raw_AbortTransaction();
throw;
}
}
More information about the Mobies-commit
mailing list