[omniORB] Loading objects on demand

Cristi bcristi@cti.ro
Tue, 28 Sep 1999 13:47:18 +0200


I tried to load objects on demand using the 'loader' provided by omniOrb2
and It seemed strange to me.

this is the function I wrote:

static CORBA::Object_ptr loader(const omniORB::objectKey& key)
{
 cerr<<"Creating  a new instance..."<<endl;
 MAdministrator::CAdministrator* obj = new
MAdministrator::CAdministrator(key);
 obj->_obj_is_ready(boa);
 return obj->_this();
};

When a client FIRST calls the object it looks OK. The server prints out:

'Creating  a new instance...'

and returns the object.

I guess if the client contacts the object after some time (when the object
was disposed after the scan period), the server should also print out:

'Creating  a new instance...'

but it doesn't.

Is this normal? Or I'm missing something...

Thanks.
Cristi