wiki:MapGuideRfc122

MapGuide RFC 122 - Configurable Coordinate System Dictionary paths

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 Date30 September 2011
Last Modified13 October 2011
AuthorJackie Ng
RFC Statusimplemented
Implementation Statuscompleted
Proposed Milestone2.4
Assigned PSC guide(s)(when determined)
Voting History13 October 2011
+1Jackie,Zac,Trevor,Bruce,Karis
+0
-0
-1
no voteBob,Tom,Paul

Overview

This RFC proposes to make the coordinate system dictionary path configurable via serverconfig.ini and webconfig.ini

Motivation

The current path where coordinate system dictionary files are stored is currently defined by the MENTOR_DICTIONARY_PATH environment variable. This approach is bad for many reasons, including:

  • Environment variables are global, making for side-by-side installations of MapGuide (of different versions) very difficult. A newer MapGuide installation will overwrite this variable, possibly rendering an existing installation's Coordinate System APIs un-usable.
  • For older versions of Windows (XP/2003), environment variable changes from the installer do not take effect until an OS restart is performed. This restart is completely unnecessary, and only exists in the installer to address this issue.

Proposed Solution

MapGuide should not use MENTOR_DICTIONARY_PATH to look for the coordinate system dictionary files. It should look for this path in a value defined by serverconfig.ini and webconfig.ini respectively.

The server and web tier startup logic will be modified as such:

  1. Read in the dictionary path from serverconfig.ini and webconfig.ini
  2. Obtain a pointer to the MgCoordinateSystemCatalog? and change the dictionary path using the SetDictionaryDir?() API, passing the read in value
  3. Check the library status of the catalog. Throw an exception if the library status is not initialized. Note that there is a current defect where the library status is not re-evaluated when SetDictionaryDir?() is called. A patch (#1821) has been made for this particular issue.

The installer will be updated to write the proper CS-Map dictionary paths to serverconfig.ini and webconfig.ini. The mandatory reboot requirement for certain versions of windows will be removed.

Implications

Nothing is affected. Because the reading and setting of the dictionary path is done on server startup and web tier startup (via MgInitializeWebTier?) before users and MapGuide Applications can start working with the Coordinate System APIs

Test Plan

Test using a custom coordinate system dictionary path specified in serverconfig.ini and webconfig.ini. Verify that MgCoordinateSystem? APIs still correctly function from the server and web tier under this alternate path.

Funding / Resources

Community

Last modified 6 years ago Last modified on Oct 28, 2011 3:05:26 AM