[omniORB] Default Servants in omniORBpy?

Duncan Grisby duncan at grisby.org
Wed Jun 2 16:30:04 BST 2004


On Wednesday 26 May, "Stephen Hansen" wrote:

> Is it possible to use Default Servants in servers written with
> omniORBpy?

Yes. I have plenty of code that uses them.

> The reason I ask is because the documentation I have (Henning&Vinoski)
> relies on PortableServer::Current to implement the functionality, and
> the documentation says its not implemented...

Which documentation says that?  It's out of date.
PortableServer::Current is fully supported.

>   that, and trying to set a
> USE_DEFAULT_SERVANT policy throws a InvalidPolicy exception.

You have to make sure you use the correct combination of policies.
This is lifted from some code I have...

policies = [
    pp.create_lifespan_policy(PortableServer.PERSISTENT),
    pp.create_id_assignment_policy(PortableServer.USER_ID),
    pp.create_request_processing_policy(PortableServer.USE_DEFAULT_SERVANT),
    pp.create_id_uniqueness_policy(PortableServer.MULTIPLE_ID) ]


Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list