Assign a new service to an existing session type using the CLI

Perform this task when you want to assign another service to an existing session type. For example, you have a new service and want to associate it with an existing session type. You want to use the new service starting with the next session.

Updating the session type in the application profile results in the following:

  • Open sessions having the updated session type will continue to use the old service until the sessions are closed

  • New sessions created after the update will use the new service

This procedure assumes that you have already created a new service package.

  1. Add the new service to the application and assign it to an existing session type:
    1. Open the application profile with an editor.
    2. Add the new service definition to the application by creating a new Service element.
    3. Set the service name and package name attributes.
    4. Change startCmd to point to your service executable.

      Leave the ${SOAM_DEPLOY_DIR} in your path as this is the deployment directory in the system. If your service is located under a subdirectory, indicate the subdirectory after ${SOAM_DEPLOY_DIR} in the path.

      On Windows:

          <Service name="ServiceA" description="My Sample Service A"
          packageName="ServiceApkg" deploymentTimeout="300">
              <osTypes>
                  <osType name="all" startCmd="${SOAM_DEPLOY_DIR}\ServiceA.exe">
                  </osType>
              </osTypes>
          </Service>
      ...
      </Profile>

      On Linux:

          <Service name="ServiceA" description="My Sample Service A"
          packageName="ServiceApkg" deploymentTimeout="300">
              <osTypes>
                  <osType name="all" startCmd="${SOAM_DEPLOY_DIR}/ServiceA">
                  </osType>
              </osTypes>
          </Service>
      ...
      </Profile>
    5. Assign the new service to a session type by setting the serviceName attribute in the Type element to the service name that you specified in the Service element.

      For example:

      ...
      <Profile ...>
          ...
              <SessionTypes>
                  <Type name="MysessiontypeA" serviceName="ServiceA" priority="1" 
                  recoverable="false" sessionRetryLimit="3" taskRetryLimit="3" 
                  abortSessionIfTaskFail="false" suspendGracePeriod="100"  
                  taskCleanupPeriod="100"persistSessionHistory="all"
                  persistTaskHistory="all"/>
              </SessionTypes>
    6. Save the application profile.
  2. Register the application profile dynamically with the soamreg command.

    For example:

    soamreg SampleApp.xml -d

    The application is updated, registered, and enabled. Existing clients and workload are not affected by the update. You can use the new service when you create a new session.

  3. Verify that the workload is still running (applicable to long-running tasks):

    For example:

    soamview session SampleApp