Changing a service package using the CLI

Perform this task when you want to replace a service package but you also want to be able to easily switch back to the original service package. Workload continues to run with the next scheduled task using the updated service package.

Procedure

  1. Compile your new service binaries and add them to the service package.
  2. At the command prompt, change your current directory to the directory where the service package is located.
    Note: For the following step, ensure that the package name is different than the original package name in the repository.
  3. Deploy the service package:
    For example:
    soamdeploy add SampleApp_pkg2 -p SampleApp_pkg2.zip -c /SampleApplications/SOASamples
  4. Associate the new service package with the service:
    1. Open the application profile with an editor.
    2. Update the service package name.
      The following example shows packageName="SampleApp_pkg2":
      <Profile ...>
          <Service name="ServiceA" description="My Sample Service A"
          packageName="SampleApp_pkg2" deploymentTimeout="300">
          </Service>
      ...
      </Profile>
    3. Save the file.
  5. Register the application dynamically.
    For example:
    soamreg SampleApp.xml -d
  6. Verify that the workload is still running (applicable to long-running tasks):
    For example:
    soamview session SampleApp
    Note: If you need to switch back to the original service package, simply associate the service with the original service package.