wiki:FdoIReaderGetConnection

FDO IReader GetConnection Support

Overview

The OSGeo MapGuide web tier architecture is currently designed to hang on to an FDO IReader interface. In such an architecture, when the web tier finally calls the Close() method on the reader, the server doesn't know which FDO connection was released along with the Reader. This makes it difficult to track how many active FDO connections are currently open. Such a limitation is going makes restricting the # of concurrent FDO provider connections and supporting single-threaded providers difficult in MapGuide.

With this change, an enhancement will be implemented that would see the FdoIReader interface updated to include a GetConnection method. The following section defines how this new method will be specified.

FdoIReader::GetConnection

The FdoIReader interface will be modified to support a Connection property as follows. All Provider implementations of FdoIReader, FdoIFeatureReader, FdoIScrollableFeatureReader, will be required to implement support for returning the Connection property. No default implementation will be provided.

/// \brief
/// The FdoIFeatureReader interface provides a forward-only, read-only iterator
/// for reading feature data.  A reference to an FdoIFeatureReader is returned
/// from the Select and SelectAndLock commands. Because the initial position of the
/// FdoIFeatureReader is prior to the first item, you must call
/// ReadNext to begin accessing any data.
class FdoIReader: public FdoIDisposable
{
public:
    /// \brief
    /// Retrieves the FdoIConnection associated to the reader object
    /// 
    /// \return
    /// Returns the FdoIConnection object attached to the reader object. The
    /// returned connection object's reference count will be incremented. 
    /// Callers are expected to Release the connection once finished with it.
    ///
    /// \remarks
    /// Throws an instance of FdoException if an error occurs.
    /// 
    FDO_API virtual FdoIConnection* GetConnection(void) = 0;
Last modified 17 years ago Last modified on Oct 18, 2007, 8:30:35 AM
Note: See TracWiki for help on using the wiki.