id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,external_id 2165,MgFeatureService::UpdateFeatures does not roll back transaction on exceptions when useTransaction = true,jng,,"If you do a call to MgFeatureService::UpdateFeatures with useTransaction = true, the transaction that gets created is not actually rolled back in the event of an exception The problem is in this line in [http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Server/src/Services/Feature/ServerUpdateFeatures.cpp#L138 ServerUpdateFeatures.cpp] {{{ MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW(resource, L""MgServerUpdateFeatures.UpdateFeatures"") if (transaction != NULL && !commited) { transaction->Rollback(); } MG_FEATURE_SERVICE_THROW() }}} We should not be using MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH_AND_THROW as any caught exceptions are immediately rethrown after its exception processing has occurred. Because of this, the transaction rollback code afterwards is never reached. The fix is to replace that macro with MG_FEATURE_SERVICE_CHECK_CONNECTION_CATCH, allowing the rollback code to be executed. There is already a MG_FEATURE_SERVICE_THROW() macro defined after the rollback code, so such caught exceptions will get re-thrown",defect,closed,high,,Feature Service,2.4.0,blocker,fixed,,,