Indicates this functionality was introduced in fixpack 8.0.1.2

Updating context roots in an existing network deployment environment

You can update the context root of your applications and widgets by adding a prefix.

Procedure

Complete the following steps:

  1. Make sure that the cluster or clusters for your network deployment are stopped. If not, stop them in the following order:
    1. AppTarget
    2. WebApp
    3. Support
    4. Messaging

    For more information, see Stopping a cluster.

  2. Run the updateContextRootPrefix script to update the business space.

    From WAS_HOME/BusinessSpace/scripts, run updateContextRootPrefix, specifying the profile, cluster, and prefix (for example, CompanyName), as shown in the following example:

    For UNIX operating systemFor Linux operating system
    WAS_HOME/BusinessSpace/scripts/updateContextRootPrefix.sh 
    -profileName Dmgr01 -clusterName cluster.AppTarget 
    -contextRootPrefix CompanyName
    For Windows operating system
    WAS_HOME\BusinessSpace\scripts\updateContextRootPrefix.bat 
    -profileName Dmgr01 -clusterName cluster.AppTarget 
    -contextRootPrefix CompanyName

    The value for -profileName is the name of the deployment manager profile. The value for -clusterName is the cluster on which Business Space is running.

  3. Make sure that the cluster or clusters are started. If not, start them in the following order:
    1. Messaging
    2. Support
    3. WebApp
    4. AppTarget

    For more information, see Starting a cluster.

  4. Determine the name of the Rest Services Gateway application on your system by following these steps:
    1. From the WebSphere® Application Server administrative console, click Applications > Application Types > WebSphere enterprise applications.
    2. Click the REST Services Gateway_xxx_yyy entry to open the configuration page.
    3. On the configuration page, note the name as shown in the Name field. The name might include special characters such as underscores, and you need to include those characters when you specify the Rest Services Gateway in subsequent steps.
  5. Update the REST service provider by running the updateRESTServiceProvider command to change the context root from rest to prefix/rest:
    1. From deployment_manager/bin, open a command window and type the following command: wsadmin -lang jython
    2. At the wsadmin prompt, type the updateRESTServiceProvider command.
      • For the value of -clusterName, specify the cluster on which the REST services gateway is deployed.
      • For the value of -appName, enter the Rest Services Gateway name that you determined from the WebSphere Application Server administrative console in step 4.c.
      • For prefix/rest, substitute your prefix (for example, CompanyName/rest).
      AdminTask.updateRESTServiceProvider(['-clusterName', 
      'DE.WebApp','-appName', 'REST Services Gateway_xxx_yyy', '-webModuleName',
       'rest.gateway.war', '-contextRoot', '/CompanyName/rest'])
    3. At the wsadmin prompt, type the following command, substituting your own prefix (for example, CompanyName) for prefix.

      For 'REST Services Gateway_xxx_yyy', use the name that you determined from the WebSphere Application Server administrative console in step 4.c.

      AdminApp.edit('REST Services Gateway_xxx_yyy', '[ -CtxRootForWebMod 
      [[ "REST Services Gateway" rest.gateway.war,WEB-INF/web.xml 
      prefix/rest]]]' ) 
    4. Save the configuration changes by typing the following command at the wsadmin prompt: AdminConfig.save()
  6. Run the updateWidgetContextRootPrefix script to update the Monitor widgets and Cognos® widgets.

    From WAS_HOME/scripts.wbm/BusinessSpace, run updateWidgetContextRootPrefix specifying the profile, cluster, and prefix (for example, CompanyName), as shown in the following example.

    For the value of -clusterName, specify the cluster on which the Business Monitor and Cognos widgets are deployed (typically the WebApp cluster).

    For UNIX operating systemFor Linux operating system
    WAS_Home/scripts.wbm/BusinessSpace/updateWidgetContextRootPrefix.sh
    -profileName Dmgr01 -clusterName cluster.WebApp
    -contextRootPrefix prefix
    For Windows operating system
    WAS_Home\scripts.wbm\BusinessSpace\updateWidgetContextRootPrefix.bat
    -profileName Dmgr01 -clusterName cluster.WebApp
    -contextRootPrefix prefix
  7. Copy the following files from profile_Home/BusinessSpace/cluster_name/mm.runtime.prof/endpoints to a temporary directory:
    • monitorEndpoints.xml
    • cognosEndpoints.xml
    • monitorWidgetEndpoint.xml
    • cognosWidgetEndpoint.xml
  8. Update the files in tempEndPoints with the new endpoint address for REST and the widgets:
    1. Edit the cognosWidgetEndpoint.xml file.
      Change:
      <tns:url>/CognosWidgets/</tns:url>
      to
      <tns:url>/prefix/CognosWidgets/</tins:url>
    2. Edit the monitorWidgetEndpoint.xml file.
      Change:
      <tns:url>/BusinessDashboard/</tns:url>
      to
      <tns:url>/prefix/BusinessDashboard/</tns:url>
    3. Edit the cognosEndpoints.xml file.
      Important: Because Cognos is in a different cluster, you must specify the fully qualified host name and the port number where Cognos is deployed.
      Change:
      <tns:url>/p2pd/servlet/dispatch/ext/</tns:url>
      to
      <tns:url>http://fqn_host_name:port_number/prefix/servlet/dispatch/ext/</tns:url>
      Change:
      <tns:url>/p2pd/servlet/</tns:url> 
      to
      <tns:url>http://fqn_host_name:port_number/prefix/servlet/</tns:url>
      Important: For a stand-alone server, a single cluster, or when Cognos and Business Space are in the same server (cluster), you must use a relative address for the Cognos endpoints.
      Change:
      <tns:url>/p2pd/servlet/dispatch/ext/</tns:url>
      to
      <tns:url>/prefix/servlet/dispatch/ext/</tns:url>
      Change:
      <tns:url>/p2pd/servlet/</tns:url> 
      to
      <tns:url>/prefix/servlet/</tns:url>
    4. Edit the monitorEndpoints.xml file.
      Change:
      <tns:url>/rest/bpm/monitor/</tns:url>
      to
      <tns:url>/prefix/rest/bpm/monitor/</tns:url>
  9. Update the Business Space widgets:
    1. From deployment_manager/bin, open a command window and type the following command:
      wsadmin -lang jython -user AdminUserID - password AdminUserIDPassword
    2. At the wsadmin prompt, type the updateBusinessSpaceWidgets command. For the value of -clusterName, specify the cluster on which Business Space is deployed.
      For UNIX operating systemFor Linux operating system
      AdminTask.updateBusinessSpaceWidgets (['-clusterName','clusterName',
      '-endpoints', '/tempEndPoints']) 
      For Windows operating system
      AdminTask.updateBusinessSpaceWidgets (['-clusterName','clusterName',
      '-endpoints', 'C:\\tempEndPoints']) 
    3. Save the configuration changes by typing the following command at the wsadmin prompt: AdminConfig.save()
  10. Stop the clusters, node agents and deployment manager.
  11. Update the Business Space themes:
    1. From the WAS_HOME directory where the custom profile is deployed, locate the following files: WAS_HOME/BusinessSpace/themes/*
    2. Copy the files from step 11.a to the following directory: custom_profile_home/BusinessSpace.system/themes
    3. Redeploy the themes, as described in Updating templates and spaces after installing or updating widgets: Click this link to go to the topic for IBM Business Process Manager. (Opens in a new window.) Click this link to go to the topic for IBM Business Process Manager for z/OS. (Opens in a new window.)
  12. Restart the deployment manager, node agents and clusters.
  13. Update the context root for the Cognos application.
    Note: Skip this step if Cognos is not installed.
    1. If you have a four-cluster topology, complete the following steps to increase the value of the SOAP read timeout property:
      1. From deployment_manager_profile/properties, open the soap.client.props file.
      2. Change the com.ibm.SOAP.requestTimeout=180 value to 1800 (com.ibm.SOAP.requestTimeout=1800)).
      3. Restart the deployment manager, node agents and clusters.
    2. From deployment_manager/bin, open a command window and type the following command:
      wsadmin -lang jython -user AdminUserID -password AdminUserIDPassword
    3. At the wsadmin prompt, type the wbmDeployCognosService command. For the value of -cluster, specify the cluster on which Cognos is deployed.
      AdminTask.wbmDeployCognosService(['-cluster', 'clusterName', 
      '-dbName', 'cognosDB', '-dbUserName',  'dbUser', '-dbUserPassword', 'dbPw', 
      '-adminUserName', 'user', '-adminPassword', 'pw', 
      '-contextRoot', 'prefix' ])
    4. Save the configuration changes by typing the following command at the wsadmin prompt: AdminConfig.save()
    5. To make sure that the changes are applied to the Cognos server, synchronize the nodes. In the WebSphere Application Server administrative console, click System administration > Nodes, select all nodes, and click Full Resynchronize.
    6. Stop and restart all clusters and servers.
  14. Stop and restart the network topology.

What to do next

After you make the configuration changes, start Business Space (http://localhost:9083/prefix/BusinessSpace).
Tip: Clear your browser cache before you start Business Space.