State management for pooled objects, What is pooling – Pitney Bowes MapXtreme User Manual

Page 110

Advertising
background image

Chapter 6: Understanding State Management

State Management For Pooled Objects

MapXtreme v7.1

110

Developer Guide

Once you decide to follow this option of an InProc session, each user who accesses your web site
will be given a copy of the MapXtreme Session object and all it contains. Obviously if the number of
users grows, then so will the memory footprint.

Your application will also load the workspace defined in the Web.config each time a MapXtreme
Session is created. For the InProc model, this means a new MapXtreme Session is created and the
workspace is loaded when the user first visits the site.

Using the MapXtreme Template with the InProc Development Model

If you created a Web Site using the " template, be aware that it does not follow the InProc model.

To create an application with the template that uses InProc:

1. Modify the Web.config file as shown in

Configuring an Application to Use the InProc

Development Model on page 114

.

2. Remove the application's Page_Load and Page_Unload methods from MapForm1.aspx.vb or

MapForm1.aspx.cs or comment out the manual state-management code that was placed
automatically by the MapXtreme template.

State Management For Pooled Objects

State management in a pooled application is a development model that is designed to make
applications scalable. If you anticipate that your application will have a large and/or a continuously
growing number of users, the pooled model is a better choice for you than the InProc model.

What is Pooling?

In the pooled model, your application creates a finite number of MapXtreme Session objects on the
server. Each one of those object instances is then shared within the application and re-used; each
MapXtreme Session handles requests from multiple users, as illustrated in the following diagram.

Advertising