O'Reilly logo

JavaBeans Unleashed by Rick Leinecker, Dr. Donald Doherty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Caffeine Version of HelloWorld

Knowing the URL-Naming Service, the only new interface that Caffeine introduces, lets us jump right in and write some code. After all, Caffeine is just another way to develop CORBA code.

The Client

The client program consists of a single Java class: HelloWorldCaffeineClient (see Listing 21.1). This class provides a main method that performs the following functions: initializes the ORB; locates and then obtains a reference to a HelloWorld server object; invokes the getGreeting() method to get the greeting string; and displays the average Caffeinated Ping performance.

It is important to note that this example uses a URL-based naming scheme to locate a reference to the remote object.

Listing 21.1 HelloWorldCaffeineClient ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required