Server User Manual

Table Of Contents
46 Developing Applications for J2EE Servers
How JBuilder and the VisiBroker ORB work together
the Internet or through local intranets. The VisiBroker ORB has a native
implementation of IIOP to ensure high-performance and inter-operability.
The VisiBroker ORB incorporates the following compilers for working in a Java
environment:
java2iiop
The
java2iiop compiler allows you to stay in an all-Java environment. The java2iiop
compiler takes your Java interfaces and generates IIOP-compliant stubs and
skeletons. Part of the advantage of using the
java2iiop compiler is that, through the
use of extensible structs, you can pass Java serialized objects by value.
java2idl
The
java2idl compiler turns your Java code into IDL, allowing you to generate client
stubs in the programming language of your choice. In addition, because this
compiler maps your Java interfaces to IDL, you can re-implement Java objects in
another programming language that supports the same IDL.
When you develop distributed applications with JBuilder and the VisiBroker ORB, you
must first identify the objects required by the application. You will then usually follow
these steps:
1 Write a specification for each object using the IDL wizard to generate the Interface
Definition Language (IDL) file. IDL is the language an implementer uses to specify
the operations an object will provide and how they should be invoked.
2 Use the IDL compiler to generate the client stub code and server Portable Object
Adapter (POA) servant code.
3 Write the client program code.
4 Write the server object code.
5 Compile the client and server code.
6 Start the server.
7 Run the client program.
For in-depth information on using the VisiBroker ORB to create distributed applications,
see the VisiBroker documentation in the
doc directory of your Borland Enterprise Server
installation.
For more information about Common Object Request Broker Architecture (CORBA),
some useful links are:
http://www.borland.com/books Books on Borland products and related
technologies
“A White Paper: Java, RMI, and CORBA” at http://www.omg.org/news/whitepapers/
wpjava.htm
CORBA/IIOP Specification in Introduction to OMG’s Specifications at
http://www.omg.org/gettingstarted/specintro.htm
CORBA Basics at http://www.omg.org/gettingstarted/corbafaq.htm
RMI
Another way to invoke methods on remote Java objects is to use Remote Method
Invocation (RMI). The Borland Enterprise Server provides capabilities equivalent to
RMI, but, in addition, allows you to create Java objects that communicate with all other
objects that are CORBA compliant even if they are not written in Java. For an example
of a Java interface that describes an RMI remote interface, see the sample file
Account.java in the examples/vbe/rmi-iiop/Bank directory of your Borland Enterprise
Server installation.