9.3.1 Procedure for creating an OTM application
-
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.
-
-
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.
-
-
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:
Converter_c.hh
Converter_c.cc
Converter_s.hh
Converter_s.cc
Convtrter_TSC_c.hh
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:
Converter.java
ConverterHelper.java
ConverterOperations.java
ConveterPOA.java (None#)
_Converter_Stub.java (_st_Converter.java#)
_Converter_Tie.java (_tie_Converter.java#)
Converter_TSCprxy.java
Classes for other structure-type data
# File output only if the TPBroker version is V3
-
Perform compilation and linkage.
Following the OTM application development procedure, perform compilation and linkage by using the stub files generated in step 3.