Deploying MapViewer on a Multiprocess OC4J Instance Deploying MapViewer on a Middle-Tier Cluster

Introduction to MapViewer 1-41 In the preceding example: ■ The name attribute specifies the MapViewer data source name, which is needed for map requests. ■ The value for the container_ds attribute must match the JNDI Location string that you noted when you created the container Oracle RAC data source see Section 1.6.1 . ■ The number_of_mappers attribute specifies the maximum number of supported concurrent map requests that can target this data source. For more information about the name and number_of_mappers attributes, see Section 1.5.2.14 . After adding the data source definition, you must restart MapViewer to have the new data source created. After you do this, whenever you request a map from this data source, MapViewer obtains the necessary database connections from the container before proceeding.

1.7 High Availability and MapViewer

MapViewer users can benefit from the high availability features of Oracle Database and Oracle Fusion Middleware.

1.7.1 Deploying MapViewer on a Multiprocess OC4J Instance

You can safely deploy MapViewer in an OC4J instance of Oracle Fusion Middleware that has multiple processes. Oracle Fusion Middleware lets you configure the number of actual processes JVMs that can be started for each OC4J instance. On a multiprocessor host, starting multiple processes for a single OC4J can better utilize the system resources. Releases of MapViewer before 10g Release 2 10.1.2 could not take advantage of this feature and thus could not be deployed on such OC4J instances. When MapViewer is deployed to an OC4J instance with multiple processes, each process has a MapViewer server running inside it. These MapViewer servers all reside on the same host but in different Java processes. Map requests sent to this OC4J instance are automatically dispatched to the individual MapViewer servers. Each MapViewer server generates map image files according to a unique naming scheme, with the names coordinated when the different MapViewer servers are first started that is, when the containing OC4J instance is started. This avoids the possibility of two MapViewer servers generating map files in the same sequence with the same file names.

1.7.2 Deploying MapViewer on a Middle-Tier Cluster

OC4J instances in different Oracle Fusion Middleware 10gR3 installations can be clustered into an island. This provides a middle-tier fail-safe option. MapViewer can be deployed to an OC4J island. You must take care, however, about how the generated Note: This section is intended for advanced users who want to take full advantage of the high availability features of Oracle Fusion Middleware with MapViewer. You must have a strong understanding of high availability features, which are described in Oracle Fusion Middleware High Availability Guide. 1-42 Oracle Fusion Middleware Users Guide for Oracle MapViewer image files on each host are named and referenced through URLs by client applications. Consider the following sample scenario. When a map request is sent to the front Web server, it reaches the MapViewer server running on host A. MapViewer on host A then sends back the URL for the generated map image, and the client then sends a second request to fetch the actual image. This second request might be received by the OC4J container running on host B, which has no such image or which will send back an incorrect image with the same name. There is no single best solution for this problem in all environments. One option is to have the hosts share common networked storage, so that the map images are deposited in the same virtual networked file system by different MapViewer servers running on different hosts. You must configure the map file storage information see Section 1.5.2.2 for each MapViewer instance so that the images are deposited in different subdirectories or so that they have different file prefixes. Otherwise, the image files generated by the multiple MapViewer servers might overwrite each other on the disk. By properly configuring the map file storage information, you ensure that each URL sent back to the client uniquely identifies the correct map on the network drive. If you cannot use networked drives, consider using a load balancer. You may first need to configure the map file storage information for each MapViewer instance as explained in the preceding paragraph, so that each MapViewer instance names its generated images using an appropriate scheme to ensure uniqueness. You can then specify rules in the load balancer to have it redirect image requests to a certain host if the URL matches a certain pattern, such as containing a specified map image file prefix.

1.8 Secure Map Rendering