[omniORB] How to get refcount

Clarke Brunt clarke.brunt at yeomannavigation.co.uk
Mon Oct 6 14:21:52 BST 2003


>   I want to user default refcounting of omni.  So I have derived my class
> from PortableServer::ServantBase.
> _add_ref() and _remove_ref can add/remove a refcount. But what if I want
to
> get a refcount. there is nothing such as _ref_count() ?????

Do you mean you inherited RefCountServantBase? You get 'ordinary'
ServantBase anyway as a result of deriving your class from POA_whatever.

'Ordinary' ServantBase provides implementations of _add_ref and _remove_ref
which do nothing.

RefCountServantBase provides simple implementations of these as per the
standard.

If you want something different, then you are free to write your own
implementation for these methods, overriding the null ones in ServantBase.
You could look at the Omni source code for RefCountServantBase as a starting
point.

--
Clarke Brunt, Principal Software Engineer, Yeoman Navigation




More information about the omniORB-list mailing list