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

Writing the Server Code

This section introduces the basics of writing a CORBA transient server.

The structure of a CORBA server program is the same as most Java applications: You import required library packages, declare the server class, define a main() method, and remember to handle any exceptions.

Start your text editor and create a new file titled HelloServer.java. Next, important the packages required for the client class:

// The Package containing our stubs.
import HelloApp.*;
// HelloServer will use the naming service.
import org.omg.CosNaming.*;
// The package containing special exceptions
// thrown by the name service.
import org.omg.CORBA.*;

public class HelloServer
{
  // Add the main method here in the next step.
}

Declare a standard ...

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