Lesson 4.2: Determine whether specific service rankings are available

Complete this lesson to determine whether specific service rankings are available for the service names that you specify.

About this task

Procedure

  1. Enter the following command to determine whether the service named myShardListener, with service ranking 2 and service named myProtoBufSerializer, with service ranking 2 are available. The service ranking list is passed in using -sr option.
    1. Switch to the following directory:
      cd wxs_home/bin
      
    2. Enter the following command to determine whether the services are available:
      ./xscmd.sh -c osgiCheck -sr "myShardListener;2,myProtoBufSerializer;2" 
      The following output is displayed:
      CWXSI0040I: The command osgiCheck has completed successfully.
  2. Enter the following command to determine whether the service named myShardListener, with service ranking 2 and the service named myProtoBufSerializer, with service ranking 3 are available.
    1. Switch to the following directory:
      cd wxs_home/bin
      
    2. Enter the following command to determine whether the services are available:
      ./xscmd.sh -c osgiCheck -sr "myShardListener;2,myProtoBufSerializer;3" 
      The following output is displayed:
      Server           OSGi Service         Unavailable Rankings
      ------           ------------         --------------------
      collocatedServer myProtoBufSerializer          3

Results

Lesson checkpoint

In this lesson, you specified the services myShardListener and myProtoBufSerializer, along with specific service rankings to determine whether those rankings were available.