Reusing map instances

Typically, the map development system creates an instance of a map to process each transformation of data between the source and destination business objects. When the instance completes the handling of the transformation, the system frees up its resources. To reduce memory usage, the IBM system recycles an instance of a map instance by caching it and reusing it when the same type of map is instantiated at some later time. When the IBM system can recycle an existing map instance, it can avoid the overhead of map instantiation, thereby improving overall system performance and memory use.

The map development system automatically caches a map instance; that is, a map instance uses the Map Instance Reuse option by default.

Requirement: The Map Instance Reuse option imposes the following requirement on the map: If your map requires global variables, avoid initializing these global variables at declaration time. Instead, ensure that the global variables are always initialized at a map node, preferably the first transformation (attribute) node in a map.

Attention:
A map containing global variables that are not initialized at the first transformation node cannot safely be recycled because the variable values in the cached map instance persist when the instance is reused. When the cached map instance is reused and begins execution, each global variable contains the value from the end of the previous use of the map instance.

If you cannot define your map so that it meets the preceding restrictions, you must disable the Map Instance Reuse option for this map. To disable this option, remove the check mark from the Map instance reuse box, which appears in the map's Map Properties window in System Manager. This window also allows you to specify the size of the map-instance pool. For more information on the Map Properties window of System Manager, see the User Guide for WebSphere Business Integration Express and Express Plus for Item Synchronization.

Note:
Deploying the map to the server will not update the run-time instance. You can update the map properties dynamically from the server component management view by right-clicking on the map and selecting the properties from the Context menu. The changes will be automatically updated to the server.

Copyright IBM Corp. 2003