Skip Headers

Oracle9i Lite Installation and Configuration Guide for Windows NT/2000/XP
Release 5.0.2
Part No. B10040-01
Go To Table Of Contents
Contents

Previous Next

2
Configuration

This document provides information on how to configure and run the Mobile Server , as well as information on installing demos on the Mobile Server and detecting restart of the Mobile Server Repository.

The document includes discussion of the following topics:

2.1 Configuring the Mobile Server

This section provides information for configuring the Mobile Server. Installation alone does not enable you to run the Mobile Server. You must also configure a Web server as a framework to run the Mobile Server. The Mobile Server can run in the following configurations:

The remainder of this section describes in detail how to set up these configurations. When you finish your configuration, you must start the Mobile Server, which is described in Section 2.2, "Running the Mobile Server".

2.1.1 Configuring the Mobile Server Module for Oracle9iAS

You can run the Mobile Server as a module on Oracle9iAS. To accomplish this, you must first install and configure Oracle9iAS. If you are installing the Mobile Server on top of Oracle9iAS version 1.0.2.2.0, you should perform Step 1 and Step 5, skipping Steps 2–4. Steps 2–4 configure your instance of the Mobile Server to run as a module of Oracle9iAS version 2.0 or higher, and Steps 1 and 5 are required.

  1. Add the Mobile Server Module for Oracle9i Application Server to Oracle9iAS by changing the Oracle9iAS configuration file. The default location for the configuration file is:

    <Oracle9iAS_DIR>\Apache\Apache\conf\httpd.conf
    
    

    where <Oracle9iAS_DIR> is the directory where you installed Oracle9iAS.

    For example, if you installed Oracle9iAS in the location:

    \Program Files\Oracle9iAS
    
    

    then the full path to the configuration file would be:

    \Program Files\Oracle9iAS\Apache\Apache\conf\httpd.conf
    
    

    Add the Mobile Server Module for Oracle9i Application Server by adding the following line at the very end of the Oracle9iAS configuration file:

    include "<ORACLE_HOME>\mobile\server\bin\wtgias.conf" 
    
    

    This points to the wtgias.conf file. This file is the configuration file for loading the Mobile Server Module for Oracle9i Application Server inside Oracle9iAS.

  2. Open the file <ORACLE_HOME>\opmn\conf\opmn.xml and add the environment variables (like LD_LIBRARY_PATH, CLASSPATH, etc.) to it. For example:

    <ohs gid="HTTP Server" maxRetry="3">
    
        <start-mode mode="ssl"\>
    
        <environment>
    
            <prop name="LD_LIBRARY_PATH"
    
    value="\<ORACLE_HOME>\jdk\jre\lib\sparc\client:\<ORACLE_HOME>\lib"\>
            <prop name="CLASSPATH"
    value="\<ORACLE_HOME>\jdbc\lib\nls_charset12.zip:\
    <ORACLE_HOME>\jlib\jndi.jar"\> <\environment> <\ohs>
  3. Open the file <ORACLE_HOME>\config\jazn-data.xml, search for webtogo.jar and edit the following line, replacing Mobile\Server with mobile\server, to make the leading characters lower case:

    From:

    <url>file:\private\<user_name>\<ORACLE_HOME>\Mobile\Server\bin\webtogo.jar<\url>
    
    

    to:

    <url>file:\private\<user_name>\<ORACLE_HOME>\mobile\server\bin\webtogo.jar<\url>
    
    
  4. Open the file <ORACLE_HOME>\Apache\Apache\conf\mod_osso.conf and add the following to it:

       <Location \webtogo\WLTop>
    
          require valid-user
    
          AuthType Basic
    
          <\Location>
    
    

    The mod.osso.conf file should look like this:

    LoadModule osso_module libexec\mod_osso.so
    
     
    
    <IfModule mod_osso.c>
    
        OssoIpCheck on
    
        OssoIdleTimeout off
    
        OssoConfigFile
    
    \<ORACLE_HOME>\Apache\Apache\conf\osso\osso.conf#
    
     
    
    # Insert Protected Resources: (see Notes below for how to protect
    
    resources)#
    
     
    
    #-------#
    
     
    
    # Notes#
    
     
    
    #-------#
    
     
    
    # 1. Here's what you need to add to protect a resource,
    
    #    e.g. <ApacheServerRoot>\htdocs\private:
    
     
    
          <Location \webtogo\WLTop>
    
          require valid-user
    
          AuthType Basic
    
          <\Location>
    
     
    
     
    
          <Location \private>
    
          require valid-user
    
          AuthType Basic
    
          <\Location>
    <\IfModule>
    
    
  5. Start Oracle9iAS by typing the following command at the command line:

     apache -k start 
    
    

    If Oracle9iAS is already running, restart it by typing the following command at the command line:

     apache -k restart 
    
    

2.1.2 Configuring the Mobile Server Module for Apache on the Apache Server

You can run the Mobile Server as a module on the Apache Server. To accomplish this, you must first install and configure the Apache Server.

2.1.2.1 The Apache Configuration File

You add the Mobile Server Module for Apache by changing the Apache configuration file. The default location for the Apache configuration file is:

<APACHE_DIR>\conf\httpd.conf

where <APACHE_DIR> is the directory where you installed the Apache Server.

For example, if you installed the Apache Server in the location:

C:\Program Files\Apache Group\Apache

then the full path to the configuration file is:

C:\Program Files\Apache Group\Apache\conf\httpd.conf

2.1.2.2 Loading the Mobile Server Module for Apache

To configure the Mobile Server Module for Apache for the Apache Server, follow these steps:

  1. Add the Mobile Server Module for Apache to the Apache Server by adding the following line to the Apache configuration file:

    include "Oracle_Home\mobile\server\bin\wtgapach.conf"
    
    

    This points to the wtgapach.conf file. This file is the configuration file for loading the Mobile Server Module for Apache inside Apache.

  2. Start the Apache Server by typing the following command at the command line:

    apache -k start
    
    

    If the Apache Server is already running, restart it by typing the following command at the command line:

    apache -k restart
    
    
  3. Start the Mobile Server.

2.1.3 Configuring the Mobile Server to Run in Standalone Mode

In some cases, such as when you run the Mobile Server on a development machine, you may want to start it without using Oracle9iAS. You can start the Mobile Server in standalone mode by running the webtogo program. After you install the Mobile Server, start it by typing the following command:


>webtogo

If you want to start the Mobile Server in servlet debug mode (when experiencing problems with running servlets), type the following command at the command line:

>webtogo -d

If you want to start the Mobile Server in total debug mode (when experiencing problems with the server and the webtogo.ora file), type the following command:

>webtogo -d0

2.2 Running the Mobile Server

To run the Mobile Server, you (as the administrator) must first start Oracle9iAS, the Apache Server, or the webtogo program (the standalone mode). Starting the Mobile Server depends upon system configuration. There are three different configuration scenarios for the Mobile Server:


Running the Mobile Server in Configuration Scenario A:

To run the Mobile Server in Configuration Scenario A, check the <ORACLE_HOME> directory where you installed the Mobile Server. If Oracle9iAS 2.0.x or a later version is already installed on your machine, it is recommended that you install the Mobile Server in the same <ORACLE_HOME> directory where Oracle9iAS is already installed. This will avoid having duplicate copies of the required support files installed on your machine.

If you installed the Mobile Server and Oracle9iAS each in a different <ORACLE_HOME> directory, you must edit the tnsnames.ora file which is located in the <ORACLE_HOME>\network\admin directory where Oracle9iAS is installed and add the entry for WEBTOGO.WORLD into that file as described in detail in Section 1.2.1.2, "Using the Mobile Server Module for Oracle9iAS" in Chapter 1, " Installation".

If you do not create the entry for WEBTOGO.WORLD in the tnsnames.ora file and try to run the Mobile Server from Oracle9iAS, you will experience the problem of Oracle9iAS not being able to find the WEBTOGO.WORLD entry in its tnsnames.ora file, and, as a result, the Mobile Server will not run.


The Mobile Server Listener:

When the Mobile Server starts, the Mobile Server listener starts running. After running the listener, the Mobile Server makes the connection to the Mobile Server Repository.

2.2.1 Connecting to the Mobile Server Repository

The Mobile Server connects to the Repository automatically by using the Repository user name and the password in the webtogo.ora file (which are in encrypted form).

There are two scenarios where the Mobile Server does not connect automatically to the Repository because the user name and the password do not exist.

  • Scenario 1: The Mobile Server was installed without installing the Repository because you (as the Administrator) wanted to keep the existing Repository, or because at the time of installation, the existing Repository that was found was the latest version and as a result the Repository was not installed or migrated.

  • Scenario 2: You (the administrator) deleted the encrypted user name and password in the file webtogo.ora.

In the above scenarios, you (the administrator) must log in to the Mobile Server.

After starting the Mobile Server, you can log in to the Mobile Server by pointing your browser to the following URL:

http://<Mobile_Server_name>:<port_number>/webtogo/startup

Supply a user name and a password for the Mobile Server Repository. Logging in connects the Mobile Server to the Mobile Server Repository. After logging in, click the Save link to save the Repository user name and password.

The scenarios where the Mobile Server connects automatically to the Repository (and therefore does not require logging in to the Mobile Server) are:

  • Scenario 1: There is an existing Repository which is not at the latest version. The old Repository is migrated and updated during the installation of the Mobile Server.

  • Scenario 2: There is no existing Repository. A new Repository is installed during the installation of the Mobile Server.

2.2.2 Managing the Mobile Server

The Mobile Server enables the administrator to manage the Repository username and password. It also enables the administrator to turn on the auto restart feature of the Mobile Server by saving the Repository username and password in encrypted form in the webtogo.ora file. In addition, the administrator can change the Mobile Server Repository password.

To log in to the Mobile Server:

  1. Start the Mobile Server Listener.

  2. Connect to the following URL:
    http://<Mobile_Server_name>:<port_number>/webtogo/startup.
    If the Mobile Server is not running, then the following logon screen appears, as shown in Figure 2-1.

Figure 2-1 Log On Screen

Description of ms_lognr.gif is contained in the surrounding text
  1. Enter the user name and password for the Mobile Server Repository (which are the same as the schema name and password that were provided earlier during the installation process).

    Figure 2-2 Invalid Password Screen

    Description of ms_logic.gif is contained in the surrounding text
  2. Click Startup. If the password is invalid, then the Invalid User Name/Password screen appears, as shown in Figure 2-2, which enables the administrator to enter the user name and password a second time followed by clicking Logon. If the log on is successful, then the Menu Option screen appears.

    Figure 2-3 Options Menu Screen

    Description of grace1a.gif is contained in the surrounding text
  3. Select one of the following options, as shown in Figure 2-3:

    • Save - Choose this to save the Mobile Server Repository user name and password in the encrypted form in the webtogo.ora file. This will then activate the Mobile Server Auto Start feature. If you enable this feature, the Mobile Server will be connected to the Repository automatically when you start/restart the Mobile Server the next time. If you do not enable this feature, then each time you start/restart the Mobile Server, you must log in to the Mobile Server to complete the startup process.

    • Erase - This option removes the Mobile Server Repository user name and password from the webtogo.ora file. This turns off the Mobile Server Auto Start feature.

    • Change - You can use this option to change the Mobile Server Repository password. It will also overwrite the Mobile Server Repository password in the webtogo.ora file. For more information, see Section 2.2.3, "Changing the Password for the Mobile Server Repository".

    • Startup - This option is not available if the Mobile Server is already running. If the Mobile Server is not running or is terminating a session, you can use this option to start it.

    • Shutdown - Terminates the current Mobile Server session, allowing connected users to remain connected and synchronize, but preventing new connections. See Section 2.2.4, "Shutting Down the Mobile Server" for more information.

    • Log Off - Logs off the current user and presents the log on screen.

2.2.3 Changing the Password for the Mobile Server Repository

To change the password for the Mobile Server Repository:

  1. In the Menu Options screen, select Change. The Change Password screen appears as shown in Figure 2-4.

    Figure 2-4 Change Password Screen

    Description of ms_logch.gif is contained in the surrounding text
  2. Enter the current password in the Old Password field.

  3. Enter the new password in both of the New Password fields.

  4. Click Change Password to change the password of the Mobile Server Repository. This will also overwrite the old password with the new password.

2.2.4 Shutting Down the Mobile Server

The administrator can put the Mobile Server into a state where users who are connected stay connected and can synchronize normally, but no new users are allowed to log on. When the last connected user logs off, the instance of Mobile Server ends. This is referred to as terminating Mobile Server. To terminate a Mobile Server session:

  1. From the Menu Options screen, Figure 2-3, select the Shutdown option.

    Figure 2-5 Mobile Server Options Menu While Terminating

    Description of grace2a.gif is contained in the surrounding text
  2. If users are connected to Mobile Server, the screen is displayed, as shown in Figure 2-5, indicating that "Oracle Mobile Server is Terminating". The Save, Erase, Change, and Shutdown options are disabled. The Startup option restarts the Mobile Server instance seamlessly. Selecting the Log Off option logs out the administrator.

    Figure 2-6 Mobile Server is Terminating Error Screen

    Description of grace5a.gif is contained in the surrounding text
  3. Users attempting to connect to the Mobile Server while it is shutting down see the following screen displayed in Figure 2-6 which indicates that they have "Failed to logon to Web-to-Go!" because "Mobile Server is terminating!." They are also advised to contact the administrator.

    Figure 2-7 Mobile Server Options Menu for Disconnected Status

    Description of grace3a.gif is contained in the surrounding text
  4. If no users are connected, the screen shown in Figure 2-7 is diplayed indicating that "Oracle Mobile Server is not connected to the Repository". The Save, Erase, Change, and Shutdown options are disabled. The Startup option restarts the Mobile Server instance seamlessly. Selecting the Log Off option logs out the administrator.

    Figure 2-8 Mobile Server is Down Error Screen

    Description of grace4a.gif is contained in the surrounding text
  5. Users attempting to connect to the Mobile Server after it has been shut down see the following screen displayed in Figure 2-8 indicating that they have "Failed to logon to Web-to-Go!" because "Mobile Server is down!". They are also advised to contact the administrator.

2.3 Installing Demos on the Mobile Server

You can install the demos on the Mobile Server by running the batch file instdemo. This batch file is located in <ORACLE_HOME>\mobile\server\samples.

The command syntax is:

instdemo [SYSTEM_password] [Admin_Username] [Admin_Username]

For example:

instdemo manager Administrator Admin

2.4 Detecting Restart of the Mobile Server Repository

By default, the Mobile Server uses the OCI9 JDBC driver to connect to the Mobile Server Repository. This driver does not allow the Mobile Server to detect if the Oracle database containing the Mobile Server Repository has been restarted. As a result, you must manually restart the Mobile Server if the database is bounced.

If you want the Mobile Server to automatically reconnect to the Oracle database, in case the Oracle database is restarted, you must configure the Mobile Server to use the thin JDBC driver.

You can do this by changing the ADMIN_JDBC_URL parameter in the configuration file webtogo.ora.

The location of this file is <ORACLE_HOME>\mobile\server\bin\.

Set the parameter to:

ADMIN_JDBC_URL=jdbc:oracle:thin:@HOST_NAME:PORT:SID


Previous Next
Oracle Logo
Copyright © 2002 Oracle Corporation

All rights reserved
Go To Table Of Contents
Contents