Distributed application development is a feature of JBuilder Enterprise.
JBuilder provides excellent support for distributed application development. The JBuilder development environment greatly simplifies the creation of distributed applications, generating many of the files necessary to create multi-tier, distributed applications. Once the application is generated, you can add the business logic you need to the generated code. All the while you are using JBuilder's superb development environment--distributed computing enters the rapid application development (RAD) world.
This section is intended for developers familiar with distributed applications and distributed applications terminology. If you are not already familiar with these, consider reading a third-party book that explains distributed application concepts and technologies. You can find several recommended books on the Borland web site at http://www.borland.com/visibroker/books/.
For definitions of any unfamiliar Java terms, see "Java glossaries" in the Quick Start.
A discussion of the following technologies are discussed in this section:
CORBA is an open standards-based solution to distributed computing. The Object Management Group (OMG), an industry consortium, developed the specification for CORBA and specified the Internet InterORB Protocol (IIOP), the standard communication protocol between Object Request Brokers (ORBs). To read the specification, visit the OMG Web site at http://cgi.omg.org/. This site also contains information for beginning CORBA users.
CORBA's primary advantage is that clients and servers can be in any language. This magic is possible because objects are defined with the Interface Definition Language (IDL) and communication between objects, clients, and servers are handled through Object Request Brokers (ORBs). JBuilder provides excellent support for CORBA application development, in conjunction with VisiBroker for Java and OrbixWeb. The JBuilder development environment greatly simplifies the creation of CORBA applications, taking any IDL module and generating all the necessary interface files, client stubs, and server skeletons. Wizards help with the generation of CORBA Servers and clients, then you can add the business logic you need to the generated code. All the while you are using JBuilder's superb development environment--CORBA enters the rapid application development (RAD) world.
For a tutorial outlining the steps for creating a CORBA application using JBuilder and VisiBroker (but which can be easily modified to use OrbixWeb), see "Exploring CORBA-based distributed applications in JBuilder". You can find CORBA sample applications with interfaces created in IDL in the /examples
subdirectory of your VisiBroker installation.
Remote Method Invocation (RMI) enables you to create distributed Java-to-Java applications, in which the methods of remote Java objects can be invoked from other Java virtual machines, possibly on different hosts. A Java program can make a call on a remote object once it obtains a reference to the remote object, either by looking up the remote object in the bootstrap naming service provided by RMI or by receiving the reference as an argument or a return value. A client can call a remote object in a server, and that server can also be a client of other remote objects. RMI uses object serialization to marshal and unmarshall parameters and does not truncate types, supporting true object-oriented polymorphism.
The "Java Remote Method Invocation - Distributed Computing for Java (a White Paper)" article is an excellent source for understanding more about using Java RMI. Point your browser to http://java.sun.com:80/marketing/collateral/javarmi.html to access this paper.
For a tutorial using JBuilder to create an RMI application, see "Exploring Java RMI-based distributed applications in JBuilder". There are several sample applications that use Java RMI. The first is located in /jbuilder/samples/rmi. Another is located in samples/DataExpress/StreamableDataSets.
VisiBroker incorporates features, collectively known as Caffeine, which make the product Web-friendly and easy to work with in a Java environment. The Caffeine compiler provides two options for defining CORBA interfaces with Java:
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.
A sample CORBA application with interfaces defined in Java can be found in the /examples/rmi-iiop
subdirectory of your VisiBroker installation.
java2idl
compiler turns your Java code into IDL, thereby allowing you to generate client stubs in the 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.
For more information on using the Caffeine compiler, see "Caffeine: defining CORBA interfaces with Java".
Other topics in this section that will help you build n-tier applications include:
Describes the steps necessary to set up JBuilder, VisiBroker or OrbixWeb, and JDK to enable JBuilder's distributed applications functions.
Explains how to debug an application remotely using JBuilder's debug server.
You should periodically check the JBuilder Technical Publications page of the Borland web site at http://www.borland.com/techpubs/jbuilder/ for updated and new documentation and tutorials on distributed application topics. The online help system, available from the JBuilder Help menu, may have more updated information on these topics than are available at the time of this printing.
If you have questions specific to distributed applications, you can post them to the CORBA-RMI newsgroup, borland.public.jbuilder.corba-rmi, by browsing to http://www.borland.com/newsgroups/.