Solstice Enterprise Manager 4.1 CORBA Gateway Administration Guide | ![]() ![]() ![]() ![]() ![]() |
SEM CORBA ToolKit
The SEM CORBA ToolKit will let you compile, build and package the SEM CORBA Gateway.
This chapter describes the following topics:
- Section 2.1 ToolKit Overview
- Section 2.2 Building the Executables
- Section 2.3 Installing Runtime Package on Target Machine
- Section 2.4 Other SEM CORBA ToolKit Directories
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.
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: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.
The installation script installs the Makefile required for the ORB. The Makefile will have an extension corresponding to the target ORB as follows:
- Makefile.vb for VisiBroker
- Makefile.ob for Orbacus
- Makefile.io for Orbix
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:
- request_gw
- metadata_gw
- event_gw
- lib
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.
The following table lists the executables that are built and copied to the /opt/SUNWconn/em/bin directory.
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 firstmake4. 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 install6. 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 EnvironmentIf 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. SUNWemcgr2.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 DEBUGIn K/B shell:
EM_BUILDTYPE=DEBUG;export EM_BUILDTYPEOnce 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.
- build_config
- scripts
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 |