[Java programming language only]

Configuring servers with OSGI config admin

You can use the OSGi configuration administration (config admin) service to configure WebSphere® eXtreme Scale container servers.

About this task

To configure a server, the ManagedService persistent identifier (PID), com.ibm.websphere.xs.server, is set to reference the ObjectGrid server properties file on the file system. To configure a container, the ManagedServiceFactory PID, com.ibm.websphere.xs.container, is set to reference the ObjectGrid deployment XML file and ObjectGrid deployment policy XML file on the file system.

When the two PIDs are set in the config admin service, the eXtreme Scale server service automatically initializes the server and start the container with the specified configuration files. Config admin PIDs are persisted to the OSGi configuration directory. If the configuration is not cleared, the settings are retained between framework restarts.

Several third-party utilities exist for setting config admin properties. The following utilities are examples of tools that the product supports:
  • The Luminis OSGi Configuration Admin command line client allows command line configuration.
  • Apache Felix File Install allows specifying config admin PID settings in standard property files.

To configure eXtreme Scale container servers with the OSGi Configuration Administration command-line client for Luminis, complete the following steps

Procedure

  1. Create a managed service PID for the ObjectGrid server properties file in the OSGi console, by running the following commands:
    osgi> cm create com.ibm.websphere.xs.server
    osgi> cm put com.ibm.websphere.xs.server objectgrid.server.props /mypath/server.properties
  2. Create a managed service factory persistence identifier PID for the ObjectGrid container in the OSGi console by running the following commands.
    Attention: Use the PID that is created with the createf config admin command. The PID that is used in the following code snippet is only an example.
    osgi> cm createf com.ibm.websphere.xs.container
    PID: com.ibm.websphere.xs.container-123456789-0
    osgi> cm put com.ibm.websphere.xs.container-123456789-0 objectgridFile /mypath/objectGrid.xml
    osgi> cm put com.ibm.websphere.xs.container-123456789-0 deploymentPolicyFile /mypath/deployment.xml

Results

eXtreme Scale container servers are now configured to start in an Eclipse Equinox OSGi framework.

What to do next

Container servers can also be programmatically created using the ServerFactory API and OSGi bundle activators. For details on using the ServerFactory API, see the API documentation.