This topic includes the following sections:
|Notes:||The Oracle Tuxedo CORBA Java client and Oracle Tuxedo CORBA Java client ORB were deprecated in Tuxedo 8.1 and are no longer supported. All Oracle Tuxedo CORBA Java client and Oracle Tuxedo CORBA Java client ORB text references, associated code samples, should only be used to help implement/run third party Java ORB libraries, and for programmer reference only.|
|Note:||Technical support for third party CORBA Java ORBs should be provided by their respective vendors. Oracle Tuxedo does not provide any technical support or documentation for third party CORBA Java ORBs.|
For an explanation of concepts associated with CORBA applications and a description of the development process for CORBA applications, see Getting Started with Oracle Tuxedo CORBA Applications.
The Basic sample application allows users to browse for available courses and get details on selected courses. Figure 3-1 illustrates how the Basic sample application works.
The Basic sample application demonstrates the following features:
The first step in creating client and server applications is to specify all of the CORBA interfaces and their methods using OMG IDL. The Basic sample application implements the following CORBA interfaces:
Gets synopses of courses that match the search criteria from the course database and reads them into memory; returns the first subset of the synopses to the Registrar object, which in turns returns them to the client application; and provides a means for a client application to retrieve the remainder of the synopses.
Listing 3-1 shows the
univb.idl file that defines the CORBA interfaces in the Basic sample application. A copy of this file is included in the directory for the Basic sample application.
typedef unsigned long CourseNumber;
typedef sequence<CourseNumber> CourseNumberList;
typedef sequence<CourseSynopsis> CourseSynopsisList;
in unsigned long number_to_get,
out unsigned long number_remaining
typedef unsigned short Days;
const Days MONDAY = 1;
const Days TUESDAY = 2;
const Days WEDNESDAY = 4;
const Days THURSDAY = 8;
const Days FRIDAY = 16;
Days class_days; // bitmask of days
unsigned short start_hour; // whole hours in military time
unsigned short duration; // minutes
unsigned short number_of_credits;
unsigned short number_of_seats;
typedef sequence<CourseDetails> CourseDetailsList;
in string search_criteria,
in unsigned long number_to_get, // 0 = all
out unsigned long number_remaining,
out CourseSynopsisEnumerator rest
CourseDetailsList get_courses_details(in CourseNumberList
|Note:||The CORBA client applications in the University sample applications use static invocation. For an example of using the dynamic invocation interface, see Creating CORBA Client Applications.|
The interface specification defined in OMG IDL is used by the IDL compiler to generate client stubs for the client application and skeletons for the server application. The client stubs are used by the client application for all operation invocations. You use the skeleton, along with the code you write, to create the server application that implements the CORBA objects. For information about generating and using client stubs and skeletons, see Getting Started with Oracle Tuxedo CORBA Applications.
During the development process, you would use the
idl command to compile the OMG IDL file and produce client stubs and skeletons. This task has been automated in the
makefile for the Basic sample application. For a description of the
idl command, see the Oracle Tuxedo Command Reference.
The CORBA environment in Oracle Tuxedo only supports CORBA C++ types of client applications.
During the development process, you would write client application code that does the following:
get_courses_details()methods on the
C++ versions of the client application code in the Basic sample application are provided. For information about writing client applications, see Getting Started with Oracle Tuxedo CORBA Applicationsand Creating CORBA Client Applications.
During the development process, you would write the following:
C++ code for the Server object and the method implementations in the University server application are provided.
During the development process, you use the
genicf command to create an Implementation Configuration File (ICF). You then edit the ICF file to define activation and transaction policies for the
CourseSynopsisEnumerator objects. For the Basic sample application, the
CourseSynopsisEnumerator objects have an activation policy of
process and a transaction policy of
ignore. An ICF file for the Basic sample application is provided.
For information about writing server applications, see Creating CORBA Server Applications.
A key part of any CORBA application is the
UBBCONFIG file. Although creating a
UBBCONFIG file is the task of the administrator, it is important for programmers to understand that the file exists and how the file is used. When system administrators create a configuration file, they are describing the CORBA application using a set of parameters that the Oracle Tuxedo software interprets to create a runnable application.
There are two forms of the configuration file:
UBBCONFIGfile, an ASCII version of the file, created and modified with any editor. Setting Up Your Environment describes setting the required parameters in the
UBBCONFIGfile used by all University sample applications.
TUXCONFIGfile, a binary version of the
UBBCONFIGfile created using the
tmloadcfcommand. When the
tmloadcfcommand is executed, the environment variable
TUXCONFIGmust be set to the name and directory location of the
For information about the
UBBCONFIG file and the
tmloadcf command, see Setting Up an Oracle Tuxedo Application and the Oracle Tuxedo Command Reference .
To build the Basic sample application, complete the following steps:
The following sections describe these steps.
|Note:||Before you can build or run the Basic sample application, you need to complete the steps in Setting Up Your Environment.|
The files for the Basic sample application are located in the following directories:
In addition, you need to copy the
utils directory into your work directory. The
utils directory contains files that set up logging, tracing, and access to the University database.
Table 3-1 lists and describes the files you will use to create the Basic sample application.
During the installation of the Oracle Tuxedo software, the sample application files are marked read-only. Before you can edit the files or build the files in the Basic sample application, you need to change the protection of the files you copied into your work directory, as follows:
prompt>attrib -r drive:\
prompt>chmod u+rw /
Use the following command to set the environment variables used to build the client and server applications in the Basic sample application:
Use the following command to initialize the University database used with the Basic sample application:
prompt>nmake -f makefileb.nt initdb
prompt>make -f makefileb.mk initdb
Use the following command to load the
prompt>tmloadcf -y ubb_b.nt
prompt>tmloadcf -y ubb_b.mk
During the development process, you would use the
buildobjserver commands to build the client and server applications. However, for the Basic sample application, this step has been done for you.
The directory for the Basic sample application contains a
makefile that builds the client and server sample applications.
Use the following commands to build the CORBA C++ client and server application in the Basic sample application:
prompt>nmake -f makefileb.nt
prompt>make -f makefileb.mk
To run the Basic sample application, complete the following steps:
Start the system and sample application server applications in the Basic sample application by entering the following command:
This command starts the following server processes:
Before using another sample application, enter the following command to stop the system and sample application server processes:
Start the CORBA C++ client application in the Basic sample application by entering the following command:
The following sections briefly explain how to use the client applications that are included in the Basic sample application.
After starting the CORBA C++ client application, a menu with the following options appears:
<F> Find courses
<A> List all courses
<D> Display course details
To find courses that match a particular curriculum subject, complete the following steps:
To list all the courses in the database, complete the following steps:
To display the details of a particular course, complete the following steps:
To exit the C++ CORBA client application, enter
E at the Options prompt.