Generating required C++ files

You use EAServer Manager to generate the C++ files that you need to compile into a DLL or UNIX shared library as well as a class implementation template in which to write method logic. These C++ files include:

“Method call to a C++ component DLL or UNIX shared library” shows the flow of a client method call to a C++ component DLL or UNIX shared library.

  1. The client invokes a method using the proxy or stub appropriate to the type of client. The stub or proxy sends the invocation information over the network to the server.

  2. The method skeleton in the method skeletons file unmarshals the call and makes a call to the method implementation in the class implementation template.

  3. After the method executes, the method implementation returns the call to the method skeleton.

  4. The method skeleton marshals the call and sends the call to the client.

Method call to a C++ component DLL or UNIX shared library

The following figure shows the flow of a client method call to a C++ component DLL or UNIX shared library.

Figure 14-1: How C++ component methods are called

StepsGenerating required C++ files in EAServer Manager

To generate the required C++ files from a package or component, start EAServer Manager and:

  1. Select the component or, if you want to generate files for all components in a package, select the package.

  2. Select File | Generate Stub/Skeleton. The Generate Stubs & Skeletons Wizard displays. Follow the instructions on each page to generates C++ stubs and skeletons. See the online help for descriptions of any input fields that you do not understand.

File naming conventions

EAServer Manager generates the following files:

File type

File name

method skeletons file

package-name_component-name.cpp

class header file

class-name.hpp.new

class implementation template

class-name.cpp.new

stub interface file

package-name.hpp

where:

component-name is the name of the component that you defined in EAServer Manager.

class-name is the class name that you specified when you created the component.

EAServer Manager creates the directory structure based on the code base that you specify and the component name, as follows:

code_base/package_name/component_name

where:

code_base is the directory name in the Code Base field in EAServer Manager. If the Code Base field does not contain a full path name, the directory will be located under the EAServer installation directory, relative to the html/classes subdirectory.

package-name is the name of the package that contains the component.

component_name is the component name as displayed in EAServer Manager.

Regenerating changed C++ component methods

When you add or delete methods or modify component method prototypes, you must regenerate the method skeletons and class header files. You must manually add, delete, or modify the methods in the class implementation template. Before you regenerate the method skeletons and class header files, make sure that you have moved your modified class implementation template to another directory or renamed it so the generated class implementation template does not overwrite your existing class implementation template.