Unpacking the MapViewer EAR Archive Using the MapViewer Administration Page

1-6 Oracle Fusion Middleware Users Guide for Oracle MapViewer ■ A new WebLogic domain is created to host MapViewer. This approach is recommend because MapViewer is a resource-intensive application, and it is better to run it in a separate environment such as its own domain. However, it is also possible although not recommended to deploy MapViewer to an existing WebLogic domain. The main steps for deploying MapViewer to WebLogic Server are the following: 1. Unpack the MapViewer EAR Archive. 2. Configure WebLogic Server. 3. Deploy and Start MapViewer in WebLogic Server. 4. As needed, use the MapViewer Administration Page.

1.4.1.1 Unpacking the MapViewer EAR Archive

You must deploy MapViewer from an exploded directory, that is, a directory where mapviewer.ear has already been unpacked. If you instead, and incorrectly, deploy from the unpacked mapviewer.ear file, MapViewer will fail at run time. You can unpack the mapveiwer.ear archive to any directory on the server where WebLogic is running. This directory will become the working folder of your MapViewer installation, in that MapViewer will by default read the configuration file from this location, and will save generated map images to a folder under this directory. It is recommended that the directory be a permanent not temporary one. It can be a shared directory if you want the same MapViewer binaries to be deployed to multiple WebLogic servers running on multiple hosts. In the following instructions, assume that you have created a directory named ulmapviewer as the top MapViewer directory. If you create another directory, adapt the instructions accordingly. Follow these steps: 1. Copy mapviewer.ear into ulmapviewer. 2. If ulmapviewer is not already your current directory, go there. 3. Rename mapviewer.ear to mapviewer1.ear. 4. Create a subdirectory named mapviewer.ear. 5. Unpack mapviewer1.ear into mapviewer.ear that is, into ulmapviewermapviewer.ear. 6. Go to mapviewer.ear. 7. Rename web.war to web1.war. 8. Create a subdirectory named web.war. 9. Unzip web1.war into web.war that is, into ulmapviewermapviewer.earweb.war. 10. Modify the Mapviewer configuration file ulmapviewermapviewer.earweb.warWEB-INFconfmapViewerCo nfig.xml as needed, such as to change its logging level or to add permanent data source definitions. You can also modify this configuration file at any time later. MapViewer is now unpacked and configured. You must next ensure that WebLogic Server is properly configured for MapViewer, so that you will be able to deploy and run MapViewer in WebLogic Server. Introduction to MapViewer 1-7

1.4.1.2 Configuring WebLogic Server

To configure WebLogic Server, follow these steps:

1. Create a new WebLogic domain to host MapViewer by running the following

script: BEA_HOMEwlserver_10.0commonbinconfig.sh This script starts a configuration wizard. It is suggested that you name the administration user weblogic; although if you use a different name, you can specify it when you configure MapViewer. You will use the administration user to log in to the MapViewer Administration page. 2. Start the domain by running the following script: BEA_HOMEuser_projectsdomainsmap-domainstartWebLogic.sh where map-domain is the name of the domain that you created in step 1.

1.4.1.3 Deploying and Starting MapViewer in WebLogic Server

After the new domain is running, you can log in to its console to start deploying MapViewer. Follow these steps. 1. Log in to the console, which is typically accessed at: http:host:7001console where host is the host name or IP address of the system running WebLogic server.

2. In the Change Center, if a Lock Edit button is visible, click it.

If a Lock Edit button is not visible, go to the next step. If this button is not visible, it probably means that the WebLogic server has been configured with the Automatically Acquire Lock and Activate Changes option enabled.

3. Under Domain Structure, click Deployments.

The administration console page will look similar to Figure 1–3 . 1-8 Oracle Fusion Middleware Users Guide for Oracle MapViewer Figure 1–3 WebLogic Administration Console Deployments

4. Under Deployments, click Install.

The next page is displayed, as shown in Figure 1–4 . Note that the location of the MapViewer directory ulmapviewermapviewer.ear in this case is the name of the directory, not the name of the .ear file. Introduction to MapViewer 1-9 Figure 1–4 WebLogic Administration Console Location

5. Click Next.

6. Select Install this deployment as an application, and click Next.

A page with the Source Accessibility section is displayed, as shown in Figure 1–5 1-10 Oracle Fusion Middleware Users Guide for Oracle MapViewer Figure 1–5 WebLogic Administration Console Source Accessibility

7. In the Source Accessibility section, select I will make the deployment accessible

from the following location . This option causes the unpacked MapViewer location to becomes the working directory of MapViewer. It also makes it easier if you want to upgrade MapViewer in the future, in which case you simply unpack the new mapviewer.ear file to this directory and restart WebLogic Server.

8. Click Finish, to start the deployment of MapViewer.

9. If the WebLogic server has been configured with the Automatically Acquire Lock and Activate Changes option enabled, skip the rest of this step and go to the next step when the deployment is finished. Introduction to MapViewer 1-11 If the WebLogic server has not been configured with the Automatically Acquire Lock and Activate Changes option enabled, when the deployment is finished, go to the Change Center, and click Activate Changes and then Release Configuration to complete the deployment process.

10. Start MapViewer by selecting mapviewer from Deployments, clicking Start, and

selecting Servicing all requests, as shown in Figure 1–6 Figure 1–6 WebLogic Administration Console Starting MapViewer

11. Go to the following location to access MapViewer.

http:host:7001mapviewer where host is the host name or IP address of the system running WebLogic server.

1.4.1.4 Using the MapViewer Administration Page

When you first click the Admin button on the MapViewer home page, you are prompted for login information. You can use the default WebLogic administration account user name of weblogic to log in; however, if your WebLogic domain administration account uses a different user name, you must change the MapViewer 1-12 Oracle Fusion Middleware Users Guide for Oracle MapViewer weblogic.xml file, located in MAPVIEWER_ HOMEmapviewer.earweb.warWEB-INF. To change the weblogic.xml file, open it is a text editor and replace the two occurrences of weblogic with the actual administration account name. The following except shows the lines with the name to be replaced: security-role-assignment role-namemap_admin_rolerole-name principal-nameweblogicprincipal-name security-role-assignment security-role-assignment role-namesecure_maps_rolerole-name principal-nameweblogicprincipal-name security-role-assignment

1.4.2 Deploying MapViewer in an Oracle Fusion Middleware 10gR3 Environment

If you have already successfully installed Oracle Fusion Middleware 10gR3, you can deploy the MapViewer using the Oracle Enterprise Manager Server Control web interface. The main steps are the following: 1. Select an OC4J instance as the target for deploying MapViewer. You can select an existing OC4J instance, or create a new instance specifically for MapViewer. It is suggested that you create a new instance for MapViewer, but it is not required. 2. Locate the mapviewer.ear file. This file is either shipped with the Oracle Fusion Middleware 10gR3 software or can be downloaded from OTN. 3. Deploy the mapviewer.ear file to the selected OC4J instance using the Server Control web interface, or use Oracle Fusion Middleware 10gR3 command-line admin tool to deploy MapViewer or any other J2EE application. For information about using the admin tool, see the Oracle Fusion Middleware Administration Guide. To start deploying MapViewer, navigate to the Oracle Fusion Middleware 10gR3 Server Control page and select the desired OC4J instance, as shown in Figure 1–7 , where the default home OC4J instance is selected.