[omniORB] Loading objects on demand

David Riddoch djr@uk.research.att.com
Tue, 28 Sep 1999 12:13:37 +0100 (GMT)


On Tue, 28 Sep 1999, Cristi wrote:

> 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:

Eh?  There is no facility in omniORB for automically disposing of objects
after a certain amount of time.  Perhaps you are getting confused by the
idle connection scan period -- which closes TCP connections between CORBA
applications, and is transparent to the application.

If you want this functionnaltiy it should be fairly easy to implement it
yourself ...

> 'Creating  a new instance...'
> 
> but it doesn't.
> 
> Is this normal? Or I'm missing something...

So yes, this is normal.


Cheers,
David