wiki:MapGuideRfc114

Version 6 (modified by samwang, 14 years ago) ( diff )

--

MapGuide RFC 114 - Extend MapGuide Transaction API to Support Save Points

This page contains a change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission DateJune 10, 2011
Last ModifiedSam Wang, June 10, 2011
AuthorSam Wang
RFC StatusNot ready for review
Implementation StatusNot started
Proposed Milestone2.3
Assigned PSC guide(s)Bruce Dechant
Voting History(vote date)
+1
+0
-0
-1
no vote

Overview

This RFC proposes a solution to extend MapGuide transaction API to support save points.

Motivation

Due to the constraint of FDO transaction, MapGuide does not support save or nested transaction. Thus it is impossible to partially rollback the work of a transaction. Now with FDO RFC 61(http://trac.osgeo.org/fdo/wiki/FDORfc61) adopted, we can take advantage of these new APIs and enhance MapGuide feature transaction API to control the commit or rollback of a transaction at a lower level.

Proposed Solution

The current "MgTransaction" interface can add the following methods to support save points which keeps consistency with FDO transaction API.

/////////////////////////////////////////////////////////////////
/// \brief
/// MgTransaction represents a transaction to be performed in a DataStore.
/// If the transaction is time out, commit or rollback a transaction will
/// result in one exception MgFeatureServiceException thrown.
class MG_PLATFORMBASE_API MgTransaction : public MgSerializable
{
PUBLISHED_API:
......

    /// \brief
    ///  Create a save point in this transaction.
    /// 
    /// \param suggestName
    /// Suggested save point name.
    /// 
    /// \returns 
    /// The actual name used
    virtual FdoString* AddSavePoint(FdoString* suggestName) = 0;

    /// \brief
    ///  Release a specific save point.
    /// 
    /// \param savePointName 
    /// Save point name.
    /// 
    /// \returns 
    /// Returns nothing
 
    virtual void ReleaseSavePoint(FdoString* savePointName) = 0;
    
    /// \brief
    ///  Rollback the transaction to a specified save point.
    /// 
    /// \param savePointName 
    /// Save point name.
    /// 
    /// \returns 
    /// Returns nothing 
    virtual void Rollback(FdoString* savePointName) = 0;
......
}

Typically, the implementation of these API methods would forward the call request and parameters to corresponding FDO API.

Implications

Existing C#, Java and PHP API would be updated to reflect this change.

Test Plan

Existing MapGuide existing feature service unit tests will be expanded to test the proposed enhancements defined above.

Funding / Resources

Autodesk to provide funding/resources

Note: See TracWiki for help on using the wiki.