Hitachi

uCosminexus Application Server Expansion Guide


9.3.1 Procedure for creating an OTM application

  1. Create an EJB application (server application).

    Creation of an EJB application (server application) requires the following Java programs:

    • Converter.java: EJBObject inherited class

    • ConverterEJB.java: SessionBean implementation class

    • ConverterHome.java: EJBHome inherited class

    When an Enterprise Bean is compiled by using the compileBean.bat sample file, the following files are generated:

    • Converter.class

    • ConverterEJB.class

    • ConverterHome.class

    • converter.jar

    For details, see the uCosminexus Application Server Application Development Guide.

  2. Generate IDL files.

    Use the IDL generation command provided by CTM to generate IDL files from a .class file generated in step 1:

    % ctmjava2idl -g -o Converter.idl Converter.class
    • Converter.id

    • TSCjava.idl

    Perform this step in a Cosminexus environment. Because java2idl of TPBroker V5 is required, set the bin directory of Cosminexus TPBroker for the PATH environment variable.

  3. Generate stubs.

    With the IDL files generated in step 2, generate stubs by using the stub generation command provided by CTM.

    Perform this step in a client development environment. Note that the OTM environment for executing client applications and its underlying TPBroker environment must have been set up.

    For C++ applications

    % ctmidl2cpp -gen_included_files Converter.idl

    When the preceding command is executed, the following files, which are required for creating a client application, are generated:

    [Figure]Converter_c.hh

    [Figure]Converter_c.cc

    [Figure]Converter_s.hh

    [Figure]Converter_s.cc

    [Figure]Convtrter_TSC_c.hh

    [Figure]Converter_TSC_c.cc

    For Java applications

    % ctmidl2j -gen_included_files Converter.idl

    When the preceding command is executed, the following files, which are required for creating a client application, are generated:

    [Figure]Converter.java

    [Figure]ConverterHelper.java

    [Figure]ConverterOperations.java

    [Figure]ConveterPOA.java (None#)

    [Figure]_Converter_Stub.java (_st_Converter.java#)

    [Figure]_Converter_Tie.java (_tie_Converter.java#)

    [Figure]Converter_TSCprxy.java

    [Figure]Classes for other structure-type data

    # File output only if the TPBroker version is V3

  4. Perform compilation and linkage.

    Following the OTM application development procedure, perform compilation and linkage by using the stub files generated in step 3.