Bionic Buffalo Tech Note #50: Effects of Portable Object Adapter Policies
Policy Objects and
POA
Creation
Policy objects, which inherit the
CORBA::Policy
interface, are used throughout CORBA and
related specifications. The
PortableServer
module defines seven specializations of the
CORBA::
Policy
interface. Each of these has a policy value attribute which is an enumeration.
When a
POA
is created, zero or more of these seven classes of policy objects can be associated with the
POA
. For each policy object, the associated policy value is associated with the new
POA
. For each class
not explicitly indicated, a default value applies. Once the
POA
has been created, the associated policies
cannot be changed. Note that each
POA
may use different policy combinations.
In the following tables, the Min column indicates whether or not support for the associated value is
required by the Minimum CORBA specification. The default value is indicated in the Interpretation
column.
ThreadPolicy
The
ThreadPolicy
specifies the behaviour of threads in
POA
s. The policy is relevant to
multithreaded
ORB
s. The values are:
ThreadPolicyValue
Interpretation
Min
ORB_CTRL_MODEL
(default) the
ORB
assigns requests to threads
yes
SINGLE_THREAD_MODEL
no more than one thread may enter any one
SINGLE_THREAD_MODEL POA
at any given time
(multiple requests for any one
POA
will be queued)
no
MAIN_THREAD_MODEL
no more than one thread at a time may enter all
MAIN_THREAD_MODEL POA
s taken together (multiple
requests for any such
POA
will be queued)
no
The distinction between
SINGLE_THREAD_MODEL
and
MAIN_THREAD_MODEL
is important when
a servant makes an invocation which is handled by some other
POA
's servant. In the
SINGLE_THREAD_MODEL
, servants of two different
POA
s might call each other and deadlock.
LifespanPolicy
The
LifespanPolicy
value specifies the lifespan of objects implemented by the
POA
. The values
are:
Page 2 of 8