Skip to main content

How to use POA policies to implement different POA models in Orbix 6?

  • May 17, 2013
  • 0 replies
  • 0 views

Summary The article describes the four common server-side CORBA POA models and the CORBA policies needed for these models.
Article Number 26767
Environment Orbix 6 All Supported Operating Systems
Question/Problem Description How to use POA policies to implement different POA models in Orbix 6?
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution  A Portable Object Adapter (POA) is a server-side object which figures out how to turn the CORBA request into a function call on the right programming language object. It supports portable server development, with features for highly scalable servers. The CORBA server process is just a container for a collection of POAs, each POA implements some collection of CORBA objects.

When you create a POA you specify its policies.

The POA policies are used to specify:
  1. The POA’s "model" :
    • An Active Object Map (simple)
    • One of two subtypes of servant manager
      • A servant activator (lazy loader)
      • A servant locator (cache)
    • A default servant
  2. Whether the POA is multi-threaded or single-threaded
  3. Whether the POA is for persistent or transient (temporary) objects
The CORBA specification defines 7 POA policy types defined in the PortableServer module:
  • enum ServantRetentionPolicyValue {RETAIN, NON_RETAIN };
  • enum IdUniquenessPolicyValue {UNIQUE_ID, MULTIPLE_ID };
  • enum RequestProcessingPolicyValue {USE_ACTIVE_OBJECT_MAP_ONLY,USE_DEFAULT_SERVANT, USE_SERVANT_MANAGER };
  • enum IdAssignmentPolicyValue {USER_ID, SYSTEM_ID };
  • enum ThreadPolicyValue {ORB_CTRL_MODEL, SINGLE_THREAD_MODEL };
  • enum LifespanPolicyValue {TRANSIENT, PERSISTENT };
  • enum ImplicitActivationPolicyValue {IMPLICIT_ACTIVATION, NO_IMPLICIT_ACTIVATION };

The first three kinds of policy combine together to determine the POA "model" (simple, lazy loader, cache, default servant).

These three policy values below are described below.

ServantRetentionPolicyValue:
  • RETAIN. The POA has an Active Object Map
  • NON_RETAIN. The POA does not have an Active Object Map
IdUniquenessPolicyValue:
  • UNIQUE_ID. A servant can represent only one CORBA object. This is what you typically want for all the POA kinds except a "default servant" POA.
  • MULTIPLE_ID. One servant can represent several CORBA objects at the same time. You must use this policy when using default servants.

RequestProcessingPolicyValue:
  • USE_ACTIVE_OBJECT_MAP_ONLY. The POA has only an Active Object Map (no default servant or servant manager). You must combine this with RETAIN.
  • USE_DEFAULT_SERVANT. The POA has a default servant. You must combine this with MULTIPLE_ID.
  • USE_SERVANT_MANAGER. The POA has one of the two types of servant manager. Combine with RETAIN for the "lazy loader" POA model, or with NON_RETAIN for the "cache" POA model.

Below are the policies required for the four different POA models:
  1. "Simple" POA model:
    • Use RETAIN and USE_ACTIVE_OBJECT_MAP_ONLY
  2. "Lazy loader" POA model:
    • Use RETAIN and USE_SERVANT_MANAGER
  3. "Cache" POA model.
    • Use NON_RETAIN and USE_SERVANT_MANAGER
  4. "Default servant" POA model.
    • Use MULTIPLE_ID and USE_DEFAULT_SERVANT
In general servant managers (servant activator and servant locator) models are used to reduce the memory requirements of servers that must support large numbers of objects, and therefore increase scalability. Servant managers provide more flexible mappings between references and servants.
Workaround
Notes

For further details please see:
Orbix CORBA Programmer’s Guide, Chapters "Managing Server Objects" and "Managing Servants".

http://supportline.microfocus.com/productdoc.aspx (Select CORBA Middleware and Orbix Product)

Attachment

Created date: 23 November 2011
Last Modified: 13 February 2013
Last Published: 12 May 2012
First Published date: 23 November 2011

#Orbix
#KnowledgeDocs