Add a new service and session type using the CLI

Perform this task when you want to add a new service and session type to your application. For example, you want to restrict the use of a new service only to clients that have been notified about the new session type in your existing application. You want to add this new service and session type to the application without affecting existing clients or workload. New sessions created after this update can use the new service and session type.

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

  1. Add the new session type and service to the application:
    1. Open the application profile with an editor.
    2. Add the new session type definition to the application by creating a new Type element.
    3. Set the session type name and service name attributes.

      The service name can be any name you want and is used to link the session type definition with the service definition.

      For example:

      ...
      <Profile ...>
          ...
              <SessionTypes>
                  <Type name="MysessiontypeA" serviceName="SampleServiceA" priority="1" 
                  recoverable="false" sessionRetryLimit="3" taskRetryLimit="3" 
                  abortSessionIfTaskFail="false" suspendGracePeriod="100"  
                  taskCleanupPeriod="100"persistSessionHistory="all"
                  persistTaskHistory="all"/>
              </SessionTypes>
    4. Add the new service definition to the application by creating a new Service element.
    5. Set the service name and package name attributes.

      The service name must match the service name that you specified in the Type element.

    6. 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="SampleServiceA" description="My Sample Service A"
          packageName="ServiceApkg" deploymentTimeout="300">
              <osTypes>
                  <osType name="all" startCmd="${SOAM_DEPLOY_DIR}\SampleServiceA.exe">
                  </osType>
              </osTypes>
          </Service>
      ...
      </Profile>

      On Linux:

          <Service name="SampleServiceA" description="My Sample Service A"
          packageName="ServiceApkg" deploymentTimeout="300">
              <osTypes>
                  <osType name="all" startCmd="${SOAM_DEPLOY_DIR}/SampleServiceA">
                  </osType>
              </osTypes>
          </Service>
      ...
      </Profile>
    7. 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 and session type when you create a new session.

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

    For example:

    soamview session SampleApp