CORBA 2.6.1 Getting Started Guide for Java
Got STACK_OVERFLOW exception as expected.
Pop: 1000
Pop: 900
Pop: 800
Pop: 700
Pop: 600
Pop: 500
Pop: 400
Pop: 300
Pop: 200
Pop: 100
Got STACK_UNDERFLOW exception as expected.
Calling NonStop CORBA Applications from JORB Lite
The Java language allows you to "Write once, Run anywhere," which means that you can generate JORB Lite clients and servers and move
their generated
.class bytecode files to the NonStop Kernel for execution in the NonStop CORBA environment. You can also move only the
client or server
.class and their associated IOR files and allow JORB Lite applications to interoperate with NonStop CORBA applications.
You can use JORB Lite as a build environment and NonStop CORBA as an execution environment. To test this technique, follow the steps
above to build the Stack example on your PC. After building the example, you can move the generated .class files (using a program such as
FTP) to a directory on your NonStop JORB OSS system.
To set up your NonStop CORBA application, follow the steps for configuring NonStop CORBA clients and servers as listed in the Administration
Guide. You run the Stack example the same way you would if you had built it on your OSS system (see the
Running the Stack Example for
details).
This exercise shows that you can develop NonStop CORBA applications in a JORB Lite environment, move the compiled
.class bytecode files
to your OSS system, and run your Java CORBA applications within the NonStop CORBA environment.
Running Clients and Servers on Remote Machines
To demonstrate CORBA interoperability between JORB Lite and NonStop CORBA, generate the JORB Lite clients and servers by following the
steps in
Building and Running the Stack Example. Move the generated .class server files (using a program such as FTP) to a directory on your
NonStop CORBA system.
Configure the Stack example as a server on your NonStop CORBA system, as outlined in the Administration Guide. Use the Configuration Tool
to modify your NonStop CORBA configuration database so it recognizes your NonStop JORB server as a
tcp_server server.
1. On your NonStop CORBA system, start an OSS window and source the script
etc/env.sh to set up the environment.
2. Since the
.class server bytecode files built using JORB Lite now reside on your NonStop CORBA system, you can execute the Stack
application server by following the directions given in the
Running the Stack Example topic.
3. When you run the Stack application server, it generates a stringified IOR file named stack.ior in the directory where the Stack server is
executed. This file contains the stringified object reference to the Stack server object implementation executing under OSS.
4. Copy the
stack.ior file into the directory containing the Stack client .class files on your PC by using a program such as FTP.
5. Run the client as described earlier in
Building and Running the Stack example. The stack client will read the stack.ior file and use the
stringified IOR to locate the stack server executing under NonStop CORBA on the remote NonStop Kernel system, and you will see the
same output as detailed above.
Chapter 5. Installing JORB Lite Index