Example code for COPE corba/perl binding I. Reid Aug 7/98 Modified to track COPE changes 11/99. This example shows four different ways of creating CORBA objects in COPE. There is a little trickery involved in letting all these co-exist in the same server. See comments on calls to cleanupObjectOnExit() in Supervisor_impl.pm for the details. The different methods are: Temp: object ids are automatically generated and assigned by the server; the object references (IORs) corresponding to these objects are only valid for the lifetime of the client connection. Persistent: object IDs are assigned by the server side of the object implementation; because the server side always assigns the same ID for the same backend object, the IORs remain valid even if the server exits and restarts. OneServant: object IDs and therefore IORs are persistent, but there is not actually a separate Perl object in the server for each CORBA object. Instead, a single "default servant" handles all requests for objects of that type. This is appropriate for applications that put an object front end onto a database with lots of records. OnDemand: Like OneServant, except that a real Perl object is created the first time a method is invoked on the CORBA object. This is a hybrid model for cases where there are many database entries, only a few will be referred to, and you want fast access. The CORBA server only needs to hit the database the first time; from then on, the object data is in memory. The server writes its IOR at startup and the client reads it. So the programs can be run with these Unix shell commands: ce_server > /tmp/IOR & # Pause for startup ce_client `cat /tmp/IOR` # $Id: README 1206 2006-05-31 07:11:53Z rvosa $