[omniORB] Persistent Obj Refs.

Duncan Grisby dgrisby@uk.research.att.com
Thu, 21 Jun 2001 11:42:04 +0100


On Tuesday 19 June, Alex Hayward wrote:

> omniORB won't generate the same IOR for the same object ID on each run

Yes it will!  As long as you pin down the TCP port number with
-ORBpoa_iiop_port, and use a POA with the PERSISTENT policy, you get
the same IOR every time (except for irrelevant padding bytes as I just
posted). See the src/examples/poa/persistent_objref example for a
demonstration.

The omniINSPOA has absolutely _nothing_ to do with the persistence of
object references.

> This turned out to be a particular problem for me a little while ago
> because I had wanted to use a POA with PERSISTENT set and a servant
> manager to load objects from a database as required. Instead I work around
> it by having the clients call a special 'find' method if they get any
> unexpected exceptions (eg an OBJECT_NOT_EXIST exception caused by the
> server restarting).

I don't understand why you need to do this. Can you give an example
program which shows why you can't use the obvious approach?

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --