Feature Pack 4 or later

Enabling location-based services

To use and develop location-based services, and to use them in starter store enhancements, you must first enable the location-based services feature.

Before you begin

Ensure that WebSphere Commerce Feature Pack 4 or later is installed.

Procedure

  1. Complete one of the following tasks:
    • SolarisLinuxAIXLog on as a WebSphere Commerce non-root user.
    • For IBM i OS operating systemLog on with a user profile that has *SECOFR authority.
    • WindowsLog on with a user ID that is a member of the Windows Administration group.
  2. Navigate to the following directory:
    • WC_installdir/bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  3. Run the enablement script. Running the location-based services enablement script also enables the Management Center feature. That is, if the Management Center feature is disabled, it is enabled after the location-based services enablement script runs.
    • Windows
      config_ant.bat -buildfile WC_installdir/components/common/xml/enableFeature.xml 
      -DinstanceName=instance_name -DfeatureName=location-services -DdbUserPassword=db_password [-DdbaPassword=dba_password] 
      Feature Pack 5[-Dscchost=HostForScheduledJobs] Feature Pack 5[search_server_config] 
      Feature Pack 6 or later[-DsearchPort=searchPort]
      WebSphere Commerce Version 7.0.0.9 or laterFeature Pack 8[-DpasswordFile=passwordFile]
    • SolarisLinuxAIX
      ./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml 
      -DinstanceName=instance_name -DfeatureName=location-services -DdbUserPassword=db_password]  
      Feature Pack 5[-Dscchost=HostForScheduledJobs] Feature Pack 5[search_server_config] 
      Feature Pack 6 or later[-DsearchPort=searchPort]
      WebSphere Commerce Version 7.0.0.9 or laterFeature Pack 8[-DpasswordFile=passwordFile]
    • For IBM i OS operating system
      ./config_ant.sh -buildfile WC_installdir/components/common/xml/enableFeature.xml 
      -DinstanceName=instance_name -DfeatureName=location-services -DdbUserPassword=db_password [-DdbaPassword=dba_password] 
      Feature Pack 5[-Dscchost=HostForScheduledJobs] Feature Pack 5[search_server_config] 
      Feature Pack 6 or later[-DsearchPort=searchPort]
      WebSphere Commerce Version 7.0.0.9 or laterFeature Pack 8[-DpasswordFile=passwordFile]
    • WebSphere Commerce DeveloperenableFeature.bat -DfeatureName=location-services
    Where:
    instanceName
    The name of the WebSphere Commerce instance with which you are working (for example, demo).
    featureName
    The name of the WebSphere Commerce feature to enable (for example, location-services).
    dbUserPassword
    The password for the user who is connecting to the database.
    dbaPassword
    The dbaPassword is required when you are enabling the feature on any of the following:
    • An Authoring server.
    • An instance that has a development environment that is configured with content-management enabled. Content-management can be enabled with a local or remote database.
    Feature Pack 5 or laterscchost
    Feature Pack 5 or laterThe name of the host (server) on which the scheduled job runs. Use this parameter if your organization chooses to schedule jobs to run only on a specific host.

    The WebSphere Commerce scheduler runs the RefreshRegistry command to ensure that the latest data from the CMDREG table is used by the WebSphere Commerce CommandRegistry. The job runs only if the CMDREG table was modified. It runs only once, shortly after enablement is completed. By default, this scheduled job run is set to run on any host. If you want to run on a specific host, use this parameter to define the specific host.

    WebSphere Commerce Version 7.0.0.9 or laterFeature Pack 8passwordFile
    WebSphere Commerce Version 7.0.0.9 or laterFeature Pack 8Optional: The full path to the password properties file. The properties file can contain encrypted passwords that might be required when running the utility. For example, you can store encrypted database administrator (dbaPassword) or database user (dbUserPassword) passwords. Passwords that are entered on the command line take precedence over the passwords that are in the password file. For more information, see Changing config_ant utility password properties file.
    The search_server_config options help automate updating the web server configuration for IBM HTTP Server. If you do not use this option, you must manually configure your web server after you run the enablement script, as described in the next step. When the search_server_config options are used, WebSphere Commerce search helps automate creating the web server configuration. This automation is achieved by passing in more configuration parameters when you run the enablement scripts.
    Important: The automated web server configuration supports IBM HTTP Server (IHS) only. That is, it does not support or include steps for configuring non-IHS web servers such as IIS and SunOne. For other types of web servers, consult the documentation that is provided by the web server vendor to update the configuration.
    This approach includes the following considerations:
    • The WebSphere Commerce search web server's httpd.conf file is automatically created.
    • You can set up a valid configuration where the WebSphere Commerce search and WebSphere Commerce web servers have separate configuration files. That is, you do not need to manually update the plugin-cfg.xml files.
    • If preferred, you do not need to install another copy of IBM HTTP Server. The same installation can be shared with the WebSphere Commerce web server.

      A second IHS process is started to handle search HTTP requests that use the same IHS installation. A second process ensures that the configurations do not collide, while it eases configuration and maintenance.

    Important: You can skip updating the web server configuration if you previously enabled the feature foundation and passed in the search_server_config parameters during the enablement. You can also skip the update if your Solr web server is already configured.
    The following list shows the available parameters with brief explanations of each. Examples can be seen in the following task, along with more-detailed descriptions of each parameter and when it is needed and not needed:The scripts validate the values that are provided for any mandatory parameters. If values for mandatory parameters are blank, the scripts do not proceed. The error message indicates which values must be specified. An example of such an error can be viewed in the following troubleshooting reference:Where search_server_config includes the following parameters that help automate updating the web server configuration for IBM HTTP Server:
    Feature Pack 6
    searchPort
    The WebSphere Application Server virtual host port number to listen on for the WebSphere Commerce search application.
    The value must be a valid and available TCP port.
    The default value is 3737.
    If the script runs successfully in the runtime environment, a BUILD SUCCESSFUL message appears in the command window where you ran the script and in the WC_installdir/instances/instance_name/logs/enablelocation-services_timestamp.log file. For enablement details refer to log file:
    • WC_installdir/instances/instance_name/logs/enablelocation-services_timestamp.log

    WebSphere Commerce DeveloperIf the script runs successfully, the message enableFeature.bat completed is displayed in the command window. For enablement details, see the WCDE_installdir\logs\enableFeature.log file.

  4. Configure the Web server for the Solr application
    The following configuration options are available, depending on your web server and WebSphere Commerce Feature Pack version:
    • Introduced in Feature Pack 2WebSphere Commerce search deployment tasks include steps to manually update the web server configuration for IBM HTTP Server (IHS).
      This approach includes the following considerations:
      • You created the WebSphere Commerce search web server httpd.conf file.
      • A directive to listen on the search virtual host port is added.
      • The web server plug-in is installed on the web server host.
    • Feature Pack 5 or laterWebSphere Commerce search deployment tasks include steps to help automate updating the web server configuration when you use IBM HTTP Server (IHS). This automation is achieved by optionally passing in more configuration parameters when you are running the enablement scripts during the previous step. For more information, see the previous step.
    • For configuring non-IHS web servers such as IIS and SunOne, consult the provided documentation to update the configuration.
  5. WebSphere Commerce DeveloperRepublish the application:
    1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
      Feature Pack 8Note: The following warning message in the Problems view can be safely ignored:
      The source path "/.apt_generated" cannot be resolved
    2. Right click LOBTools and select OpenLaszlo Migration > Compare Customizations.
    3. Rebuild any projects that need to be rebuilt in the workspace.
      For example:
      • Rebuild LOBTools. Right-click LOBTools, then select Build OpenLazlo Project
    4. Start the WebSphere Commerce Test Server.
      Some errors are displayed in the console. These errors can be safely ignored.
    5. In the Servers view, right-click the test server then click Publish.
    6. Wait for the application to finish publishing and to restart. Ensure that no errors are displayed.
    7. If you customized a previous version of Management Center, see Migrating Management Center to migrate those customizations to the latest Management Center version.

Results

After the enablement script runs, the following features are enabled by default:
  • Location-based services (location-services)
  • Foundation (foundation)
  • Management Center (management-center)

What to do next

To work with location-based services in smartphone and tablet starter stores, you must complete the following tasks:Also see: