Oracle8i CORBA Developer's Guide and Reference Release 3 (8.1.7) Part Number A83722-01 |
|
A CORBA application requires that an ORB be active on both the client system and the system running the server. In looking at the examples shown so far in this chapter, it is not obvious how the ORB is activated, either on the client or the server. This section presents more information about that topic.
The client-side ORB is normally initialized in one of two ways:
lookup()
method on the JNDI InitialContext
object.
init
method. See "Aurora ORB Interface" for a full explanation of the init
method.
The only other time that you explicitly initialize the ORB on the client through the
Note:
ORB.init
method is when you are in a callback scenario. See "Implementing CORBA Callbacks" for a full discussion of callbacks. This discussion also includes an example that shows the ORB is initialized within the object that is called back to by the server.
The presentation that manages IIOP requests starts the ORB on the server when the session is created. If you want to retrieve the ORB instance, use the CORBA oracle.aurora.jndi.orb_dep.Orb
.init
method. See "Aurora ORB Interface" for a full explanation of this method.
Objects are activated on demand. When a client looks up an object, the ORB loads the object into memory and caches it. To activate the object, the ORB looks up the class by the fully-qualified class name under which the object was published. The class name is resolved in the schema defined at publication time, rather than the caller's schema. See the description of the command-line tool publish in the Oracle8i Java Tools Reference for more information.
When the class is located, the ORB creates a new instance of the class, using newInstance()
. For this reason, the no-argument constructor of a persistent object class must be public. If the class implements the oracle.aurora.AuroraServices.ActivatableObject
interface (as determined by the Java reflection API), then the _initializeAuroraObject()
message is sent to the instance. (See "Using the CORBA Tie Mechanism" for an example that requires _initializeAuroraObject())
.
There is no need for the server implementation to register its published objects with the object adapter using a boa.obj_is_ready()
call--the JServer ORB performs this automatically.
You register transient objects generated by other objects, such as persistent published objects, with the BOA using obj_is_ready()
. For an example, see the factory
demo in the examples/corba/basic/factory
directory of the product CD.
Visibroker enables you to implement interceptors. The Visibroker documentation provides details for how to create them.
|
Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|