Hitachi

uCosminexus Application Server Expansion Guide


9.4.1 Procedure for creating a TPBroker V5 application

This section describes the procedure for creating an application by using TPBroker V5.

For details about how to create an application for ORB clients other than TPBroker V5, see 9.4.2 Procedure for creating an application for ORB clients other than TPBroker V5.

  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.

    If you are creating a C++ application, use the following command provided by TPBroker to generate IDL files from a .class file generated in step 1:

    % java2idl Converter.class > Converter.idl
  3. Generate stubs.

    Generate stubs from the IDL files generated in step 2 or from a .class file.

    Perform this step in a client development environment.

    For C++ applications

    % idl2cpp -namespace Converter.idl

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

    [Figure]Converter_c.cc

    [Figure]Converter_c.hh

    [Figure]Converter_s.cc

    [Figure]Converter_s.hh

    For Java applications

    % java2iiop Converter.class

    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]ConverterHolder.java

    [Figure]ConverterOperations.java

    [Figure]ConveterPOA.java

    [Figure]Converter_Stub.java

    [Figure]Converter_Tie.java

    [Figure] Classes for other structure-type data

  4. Perform compilation and linkage.

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