[mapguide-trac] #1436: Ajax View: Cannot preview the basic web layout

MapGuide Open Source trac_mapguide at osgeo.org
Fri Sep 17 11:55:55 EDT 2010


#1436: Ajax View: Cannot preview the basic web layout
-----------------------+----------------------------------------------------
   Reporter:  hubu     |       Owner:  hubu 
       Type:  defect   |      Status:  new  
   Priority:  high     |   Milestone:  2.3  
  Component:  General  |     Version:  2.2.0
   Severity:  blocker  |    Keywords:       
External_id:  1345494  |  
-----------------------+----------------------------------------------------

Comment(by brucedechant):

 Buddy did some additional investigation and this is what he found:

 I think I finally got why the configuration file is reload.

 We uses  MgInitializeWebTier() to initialize the WebTier, and this
 function is implemented in the WebSupport.vcproj. The WebSupport is a
 Class Library (not a dynamical libarary).
 And it’s referenced by many other projects, such as ApacheAgent, CgiAgent,
 IsapiAgent and WebApi.
 In this project, we uses a global static variable “m_bInitialized” to
 indicate whether the webTier is initialized, if it’s true, then will not
 initialize again (just return).
 The problem is it’s a Class library, so all the dlls which reference it
 have the separate “m_bInitialized” with the different address.

 Back to the issue. When we open a web layout, the Common.aspx need to
 initialize the webTier, and the WebApi will invoke the
 “MgInitializeWebTier()” function. After finish initialized,  the value of
 “m_bInitialized” true, with the address “0x00000001800217b0”.
 Then the IsapiAgent  will invoke “MgInitializeWebTier()” function too,
 because the mapAgent need to get map from server. At this time, the value
 of “m_bInitialized” is still false, with the different address
 “0x0000000002cd1618”. Then the web is initialized one more time and the
 configuration file is loaded one more time too. And the reloading triggers
 the error in ACE.

 The solution for us is making the WebSupport as a dynamical dll, so that
 we will have only one “m_bInitialized” totally.

-- 
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/1436#comment:3>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list