Registration


Overview ~ smcconf

Overview

The SMC object registry is a repository of object information used by the SMC console to configure toolboxes, tools, and services. All tools and services must be registered in the SMC object registry. Tools must be associated with a toolbox before they can appear in an SMC console.

The registry of SMC contains two types of entries: SMC beans and toolboxes. Executable components, like client side GUI/CLI tools, external client providers, server side services, are considered beans and are deployed in the format or jar files. All the beans can have additional library jars attached to them. Toolboxes are XML-based files that describe collections of tool beans and the presentation layout of them. We will only cover the registration part of those created toolboxes and several command line editing commands that shell scripts can use. SMC comes with a GUI toolbox editor that can help administrators to create the toolboxes.

Note smcconf is a command-line tool for administering the SMC registry. It provides the capability to manipulate a toolbox and perform various registry-related tasks. The smcconf command is explained more later in this section.

Registry Basics

The SMC registry contains information about:

If you want the tool be displayed inside an SMC console, you need to:

These steps are described more later in this section.

Note SMC-based tools may or may not refer to backend SMC services. If the tool is dependent on any backend SMC service(s), the service(s) also need(s) to be registered using smcconf. Unless the dependent service(s) are registered, SMC will not be able to invoke or display the corresponding tool.

The name of the tool or service bean can be found in the manifest of the jar file specified on the command line. The bean name can be used later to unregister the tool or service, or as a handle to which libraries/properties may be attached or detached.

Goto Top
smcconf

Some of the common object registry tasks you can perform with the smcconf tool include:

Each of these tasks is discussed below.

Registering Tool and Service Beans

Registering the tool or service jar file does not remove the jar file from its original location. It simply makes the tool or service usable from within the SMC by adding the information related to the new tool or service to the SMC registry. The command used to register a tool or service bean is:

smcconf repository add bean <path>/<jarfile>.jar

If the tool or service bean has already been registered, smcconf will not allow you to overwrite the existing tool/service bean unless you use the -f option as show below.

smcconf repository add -f bean <path>/<jarfile>.jar

where <jarfile>.jar is an existing tool or service bean.

For example, to register /usr/lib/MyTool.jar:

smcconf repository add -f bean /usr/lib/myTool.jar

Any service jar that requires a native library can simply include the native library in the jar file, but also add an entry for the native library to the manifest file, as discussed in Packaging.

Unregistering Tools and Services

Unregistering a tool or service will make it unavailable from within the SMC. It removes the registered tool or service information from the SMC registry. The command used to unregister a tool or service is:

smcconf repository remove bean <beanname>

where <beanname> is a registered tool or service.

For example, to unregister the bean com.mycompany.myproduct.MyTool:

smcconf repository remove bean com.mycompany.myproduct.MyTool

Attaching and Detaching Resource Jars

You can attach or detach resource jars to or from any of the following:

Any SMC bean can have pluggable libraries attached to it. These library jars can be resource bundles in different locales, as well as function code that needs to be seperately upgradable. Library jars that are attached to specific beans will be visible to that bean only at runtime. However, there are 3 special bean keywords recognized by smcconf that allow you to control the scope of library usage on a wider scale: ALL allows the library to be used by all tools and services, ALLTOOL allows the library to be used only by other tools, and ALLSERVICE allows the library to be used only by other services.

Note Use the -f (force) option to override any resource jar attachment. The -f option can be used while attaching a library jar only.

Adding and Removing Properties

You can define and undefine properties (key/value pairs) for any of the following:

Note As with library jars, the keywords ALL, ALLTOOL, and ALLSERVICE allow you to control the scope of properties beyond specific beans.

Managing Toolboxes

Listing Registered Tools/Services

To list the contents of registered tools/services/attachments/properties, use the following command:

smcconf repository list

This command lists the following information:

Registering Legacy Tools

Any CLI (Command Line Interface) or XAPP (X Applications) tool can also be registered with the SMC registry. This will allow the SMC to invoke the corresponding CLI/XAPP tool from within the console; for example:

smcconf toolbox add legacy -N "Ls Tool" -T CLI -E /usr/bin/ls -P " -alR "
smcconf toolbox add legacy -N "Clock" -T XAPP -E /usr/openwin/bin/xclock

For more information, please refer to the smcconf man page.