Spec-Zone .ru
спецификации, руководства, описания, API

Developing Servers

This document was not updated for this release

This topic introduces Java IDL support for servers of both persistent and transient CORBA objects.

Transient and Persistent Objects

A persistent CORBA object lives until it is explicitly destroyed. If a client has a reference to a persistent CORBA object, that reference can be used even if the object's server is not running -- an ORB daemon, ORBD, will start the server when the ORB receives an invocation on the object.

Starting with J2SE 1.4, Java IDL includes a Portable Object Adapter (POA), Object Request Broker Daemon (ORBD), and the servertool. These features enable persistent object servers to be written using Java IDL!

By contrast, a transient CORBA object has the same lifetime as the execution of the server process that creates it. When a server terminates, its transient objects disappear with it and any object references held by the client become invalid. Transient objects are often used to effect asynchronous, or callback communication between applications and objects. For example, suppose a timing service notifies a client application when an interval expires; it could do so as follows:

The arrangement, in other words, is much like a callback in procedural programming.

Persistent Object Servers

Starting with J2SE 1.4, Java IDL includes a Portable Object Adapter (POA), Object Request Broker Daemon (ORBD), and the servertool. These features enable persistent object servers to be written using Java IDL! The tutorial Hello World with persistent server provides a version of the "Hello World" application that utilizes a persistent object server.

Transient Object Servers

The Hello World example includes a transient object server.


Java Technology

Copyright © 1993, 2010, Oracle and/or its affiliates. All rights reserved.

Contact Us