Lesson 2.3: Configure the eXtreme Scale container

Complete this lesson to configure a container, which includes the WebSphere® eXtreme Scale ObjectGrid descriptor XML file and ObjectGrid deployment XML file. These files include the configuration for the grid and its topology.

About this task

To create a container, first create a configuration service using the managed service factory process identification number (PID), com.ibm.websphere.xs.container. The service configuration is a managed service factory, so you can create multiple service PIDs from the factory PID. Then, to start the container service, set the objectgridFile and deploymentPolicyFile PIDs to each service PID.

Complete the following steps to customize and add the server properties to the OSGi framework:

Procedure

  1. In the OSGI console, enter the following command to create the container from the file:
    osgi> cm createf com.ibm.websphere.xs.container
    PID: com.ibm.websphere.xs.container-1291179621421-0
  2. Enter the following commands to bind the newly created PID to the ObjectGrid XML files.
    Remember: The PID number will be different from what is included in this example.
    osgi> cm put com.ibm.websphere.xs.container-1291179621421-0 objectgridFile wxs_sample_osgi_root/projects/server/META-INF/protoBufObjectgrid.xml
    
    osgi> cm put com.ibm.websphere.xs.container-1291179621421-0 deploymentPolicyFile wxs_sample_osgi_root/projects/server/META-INF/protoBufDeployment.xml
  3. Use the following command to display the configuration:
    osgi> cm get com.ibm.websphere.xs.container-1291760127968-0
    Configuration for service (pid) "com.ibm.websphere.xs.container-1291760127968-0"
    (bundle location = null)
    
    key                    value
    ------                 ------
    deploymentPolicyFile   /opt/wxs/ObjectGrid/samples/OSGiProto/server/META-INF/protoBufDeployment.xml
    objectgridFile         /opt/wxs/ObjectGrid/samples/OSGiProto/server/META-INF/protoBufObjectgrid.xml
    service.factoryPid     com.ibm.websphere.xs.container
    service.pid            com.ibm.websphere.xs.container-1291760127968-0

Results

Lesson checkpoint

In this lesson, you created a configuration service, which you used to create an eXtreme Scale container. Since the ObjectGrid XML files contain the configuration for the grid and its topology, you had to bind the container that you created to those ObjectGrid XML files. With this configuration, the eXtreme Scale container can recognize the OSGi bundles that you will run later in this tutorial.