[omniORB] Nailing the port number of an orb...

Theo Aukerman taukerman@logici.com
Mon, 24 Jan 2000 06:57:49 -0800


When omniORB (I'm currently using 2.7.1) generates keys, it fills in
portions
of the object key with a time value.  It is this behavior which makes the
key
change every time you restart your server.

You need to pin down the port number using "-BOAiiop_port", and provide a
constant object key when constructing your object.

In the following example of using a constant object key, ISentryInfo is our
IDL
defined interface, SentryInfo_i is derived from _sk_ISentryInfo.


____________code sample_______________
const omniObjectKey SentryInfoKey = {0,0,some value};

SentryInfo_i::SentryInfo_i()
	:_sk_ISentryInfo(SentryInfoKey)		// use constant object key
{
};



Theo Aukerman
Taukerman@logici.com
(619)-455-7299x122

All those who believe in telekinesis, raise my hand.


-----Original Message-----
From: Andrew Weaver [mailto:Andrew.Weaver@tecnomen.fi]
Sent: Monday, January 24, 2000 3:58 AM
To: 'omniorb-list@uk.research.att.com'
Subject: [omniORB] Nailing the port number of an orb...


Hello, I have a situation here where it would be very desirable to have the
IORs of certain objects remain the same even when the application has been
stopped/rebuilt/restarted. 

Is this possible? Is it only the port number that the orb is listening to
for requests that makes the IOR different (or potentially different) from
run to run? 

Kind Regards

Andy Weaver