Solstice Enterprise Manager 4.1 CORBA Gateway Administration Guide Doc Set ContentsPreviousNextIndex


Chapter 2

SEM CORBA ToolKit

The SEM CORBA ToolKit will let you compile, build and package the SEM CORBA Gateway.

This chapter describes the following topics:

2.1 ToolKit Overview

The SEM CORBA ToolKit is a means by which the product delivered is made to be independent of the ORB. It is delivered as a set of libraries, C++ source files, include files, IDL files, Makefiles, and scripts. While installing Solstice EM you are prompted to optionally install the SUNWemcgs package which contains all the ToolKit components. All these components (and hence the SEM CORBA ToolKit) are installed during the Solstice EM installation only if you choose to install the SUNWemcgs package.

You will need to build the SEM CORBA Gateway by executing the Makefiles provided. The build can be done either individually for each module of the Gateway or all in one shot by executing a Makefile in the home directory of the ToolKit.


Note – It is recommended that you run the Makefile in the home directory of the ToolKit so that a complete integration of the platform is achieved and the package is created.

2.1.1 Contents of ToolKit

The ToolKit basically consists of components which are ORB dependent and ORB independent. The ORB dependent components are in the form of source files (IDL, C++ and header files). The ORB independent files are distributed as shared libraries. The following table gives the contents and their location in the installation.

TABLE 2-1   ToolKit Contents and Their Location
No. Component Name ORB Dependent/Independent Location/Name Dependent
1.
IDL files
Dependent
/opt/SUNWconn/em/src/corba_gateway/idl
2.
Request Gateway source
Dependent
/opt/SUNWconn/em/src/corba_gateway/src/request _gw
3.
Request Gateway shared lib
Independent
/opt/SUNWconn/em/lib/libem_corba_rgw.so
4.
Event Gateway source
Dependent
/opt/SUNWconn/em/src/corba_gateway src/event_gw
5.
Event Gateway shared lib
Independent
/opt/SUNWconn/em/lib/libem_corba_eds.so
6.
Metadata Gateway source
Dependent
/opt/SUNWconn/em/src/corba_gateway src/metadata_gw
7.
Metadata Gateway shared lib
Independent
/opt/SUNWconn/em/lib/libem_corba_mgw.so
8.
Converter & Utility lib source
Dependent
/opt/SUNWconn/em/src/lib
9.
Scripts
Independent
/opt/SUNWconn/em/src/corba_gateway/scripts


The /opt/SUNWconn/em/src/corba_gateway directory is the home directory of the SEM CORBA ToolKit.

2.1.2 Setting-up Build Environment for SEM CORBA ToolKit

The SEM CORBA ToolKit build environment needs to be setup to make it work with the ToolKit.

Setup the build environment by performing the following steps.

1. Setup Solstice EM environment file by executing the following command:

For C shell:

source/opt/SUNWconn/em/bin/emenv.csh

For K/B shell:

. /opt/SUNWconn/em/bin/emenv.sh

2. Setup SEM CORBA environment by using the following command:

For C shell:

source/opt/SUNWconn/em/bin/em_corba_env.csh

For K/B shell:

. /opt/SUNWconn/em/bin/em_corba_env.sh


Note – Depending on the ORB selected during installation the em_corba_env.csh and em_corba_env.sh scripts contain certain environment variables with default values. It is suggested that you modify the default values of the environment variables to your ORB specific parameters.

3. Setup the path for the 5.3 C++ compiler.

4. Setup the EM_BUILDTYPE environment variable as required, see Section 2.3.1 Compiling Debug Mode.

The following sub-sections will give a description of the individual directories of the ToolKit.

2.1.3 IDL Files

The /opt/SUNWconn/em/src/corba_gateway/idl directory has all the information required to build and implement the CORBA interfaces exposed by the SEM CORBA Gateway. The Makefile in this directory can be executed to compile the IDL files, compile the C++ files generated and build the libraries. The following table gives a list of the libraries generated based on each of the directories.

TABLE 2-2   ToolKit IDL Directories and Corresponding Libraries Generated
No. Directory Library Generated Target ORB
1.
auth_proxy
libob_idl_auth_proxy.so
Orbacus
2.
auth_proxy
libvb_idl_auth_proxy.so
VisiBroker
3.
auth_proxy
libio_idl_auth_proxy.so
Orbix
4.
cos
libob_idl_cos.so
Orbacus
5.
cos
libvb_idl_cos.so
VisiBroker
6.
cos
libio_idl_cos.so
Orbix
7.
jidm
libob_idl_jidm.so
Orbacus
8.
jidm
libvb_idl_jidm.so
VisiBroker
9.
jidm
libio_idl_jidm.so
Orbix
10.
jidm_ext
libob_idl_jidm_ext.so
Orbacus
11.
jidm_ext
libvb_idl_jidm_ext.so
VisiBroker
12.
jidm_ext
libio_idl_jidm_ext.so
Orbix
13.
event_gw
libob_idl_event_gw.so
Orbacus
14.
event_gw
libvb_idl_event_gw.so
VisiBroker
15.
event_gw
libio_idl_event_gw.so
Orbix
16.
metadata_gw
libob_idl_metadata_gw.so
Orbacus
17.
metadata_gw
libvb_idl_metadata_gw.so
VisiBroker
18.
metadata_gw
libio_idl_metadata_gw.so
Orbix


The installation script installs the Makefile required for the ORB. The Makefile will have an extension corresponding to the target ORB as follows:

The Makefiles compile the IDL files and the corresponding C++ and header files generated are moved to build directories. For example, the Makefile.vb (which is the Makefile installed for VisiBroker) for the JIDM directory will compile all the IDL files; the C++ files generated are copied to corba_gateway/src/idl_generated/vb/jidm directory; and the header files are copied to /opt/SUNWconn/em/include/idl_generated/vb/jidm directory. The Makefile.vb will further compile the C++ files and build the shared libraries (the names of shared libraries are listed in TABLE 2-2) and the libraries are copied to /opt/SUNWconn/em/lib directory.


Note – Prior to execution of the Makefiles the SEM CORBA ToolKit build environment should be set (see Section2.1.2 Setting-up Build Environment for SEM CORBA ToolKit).

The corba_gateway/src directory contains the source files which are ORB dependent. These files are compiled using the ORB specific Makefiles that are present in the respective directories.

The source files are distributed in the following directories:

The request_gw has all the ORB dependent C++ source files that need to be compiled to be able to build the SEM CORBA Request Gateway (RGW) and similarly the Metadata Gateway and Event Gateway directories are built using the corresponding Makefiles. The lib directory contains the converter and utility libraries that the gateway executables link to.

The following table lists the shared libraries that are compiled and copied from the lib directories.

TABLE 2-3   ToolKit Generated Converter and Utility Libraries 
No. Directory Executable Name ORB
1.
lib/auth_helper
libvb_auth_helper.so
VisiBroker




libob_auth_helper.so
Orbacus




libio_corba_utils.so
Orbix
2.
lib/cmis_converter
libvb_cmis_converter.so
VisiBroker




libob_cmis_converter.so
Orbacus




libio_cmis_converter.so
Orbix
3.
lib/ccpiac
libvb_cppiac.so
VisiBroker




libob_cppiac.so
Orbacus




libio_cppiac.so
Orbix
4.
lib/cgw_utils
libvb_cgw_utils.so
VisiBroker




libob_cgw_utils.so
Orbacus




libio_cgw_utils.so
Orbix
5.
lib/corba_utils
libvb_corba_utils.so
VisiBroker




libob_corba_utils.so
Orbacus




libio_corba_utils.so
Orbix


The following table lists the executables that are built and copied to the /opt/SUNWconn/em/bin directory.

TABLE 2-4   ToolKit Generated Executables 
No. Directory Executable Name ORB
1.
request_gw
em_vb_corba_rgw
VisiBroker




em_ob_corba_rgw
Orbacus




em_io_corba_rgw
Orbix
2.
metadata_gw
em_vb_corba_mgw
VisiBroker




em_ob_corba_mgw
Orbacus




em_io_corba_mgw
Orbix
3.
event_gw/epr
em_vb_corba_epr
VisiBroker




em_ob_corba_epr
Orbacus




em_io_corba_epr
Orbix
4.
event_gw/corba_eds
em_vb_corba_eds
VisiBroker




em_ob_corba_eds
Orbacus




em_io_corba_eds
Orbix


2.2 Building the Executables

The SEM CORBA ToolKit can build executables for any one of the three ORB that are supported.

Build the executables by performing the following steps:

1. Login as root.

2. Setup the SEM CORBA ToolKit development environment (see, Section2.1.2 Setting-up Build Environment for SEM CORBA ToolKit).

By performing this step you would have set the path to the ORB, the Make utility and the C++ compiler; also you would have set the LD_LIBRARY_PATH for the build commands.

3. Execute the following command from home directory of the ToolKit, to set some of the options and environment variables to be used in the Makefiles.

make firstmake

4. Execute the following command if you have a previously installed ToolKit.

make clean

You may skip this step if you do not have a ToolKit previously installed.

5. Execute the following command from the ToolKit home directory to do a complete build and installation of the SEM CORBA Gateway.

make install

6. Execute the following command to create the corba-runtime package SUNWemcgr

make package

The SUNWemcgr package is created in the ToolKit home directory of the development machine.

2.3 Installing Runtime Package on Target Machine


FIGURE 2-1   SEM CORBA ToolKit Development Environment

If you want to install the runtime package on any other target machine other than the development machine perform the following steps:

1. Log on to the target machine as root.

2. Copy SUNWemcgr package from the development machine to the target machine.

3. Execute the following command in the target machine:

/usr/sbin/pkgadd -d. SUNWemcgr

2.3.1 Compiling Debug Mode

The SEM CORBA Gateway can be built in the debug mode by using the environment variable EM_BUILDTYPE. Under the normal circumstances, this variable is set to OPT. To build the SEM CORBA Gateway in debug mode, this environment variable should be set to DEBUG. Use the following command to set debug mode.

In C shell:

setenv EM_BUILDTYPE DEBUG

In K/B shell:

EM_BUILDTYPE=DEBUG;export 
EM_BUILDTYPE

Once EM_BUILDTYPE is set, the execution of Makefile will compile and build the executables and libraries in debug mode.

2.4 Other SEM CORBA ToolKit Directories

The SEM CORBA ToolKit home has the following directories apart from the src and idl directories discussed previously.

The build_config contains the Master.Makefile which gets included in all the other Makefiles and the template file for the ORB (vb.tmpl for VisiBroker; ob.tmpl for Orbacus; io.tmpl for Orbix).

The scripts directory contains the shell scripts that define the environment variables required to be able to use the ToolKit.


Sun Microsystems, Inc.
Copyright information. All rights reserved.
Doc Set  |   Contents   |   Previous   |   Next   |   Index