background image
Bionic Buffalo Tech Note #25: Quick Start Guide to Writing CORBA Server Applications
 
ServantRetentionPolicy. On the other hand, if the number of objects is limited,
and the same servant will always be used for any given object, the use of an Active Object
Map can be efficient. Consider the potential size of the Active Object Map when
choosing the 
ServantRetentionPolicy.  
Choosing an appropriate 
RequestProcessingPolicy usually is a
straightforward process, depending on how the design selects the servant to be used
for an incoming request.
 
LifespanPolicy 
Although the 
LifespanPolicy applies to POAs, the effect of the policy applies to
object references created by a given 
POA. The impact of the policy is felt when the ORB
receives a request for an object, but the object's 
POA which created it no longer exists. In
those situations: 
 
If the reference was created by a 
POA whose LifespanPolicy is TRANSIENT,
then the 
ORB fails the request. 
 
If the reference was created by a 
POA whose LifespanPolicy is PERSISTENT,
then the 
ORB attempts to activate the missing POA. The ORB tries to create a missing
POA by calling the parent POA's adapter activator. This requires that the missing
POA's parent have an adapter activator registered with it. 
Although an object reference might be created by a 
TRANSIENT POA, it still might be
“persistent” in a more general sense. The distinction meant by the 
LifespanPolicy is
merely whether or not the 
ORB will attempt to activate a missing POA. 
Use the 
PERSISTENT LifespanPolicy when, for whatever reason, you want to
have 
POAs which are not always active, and you want the ORB to activate them
automatically when requests arrive. This may include situations where the 
POA is used
infrequently, and is not kept active between invocations. 
IdUniquenessPolicy 
The 
IdUniquenessPolicy specifies whether there is only one, or possibly more than
one, object per servant. If the value is 
UNIQUE_ID, then that each of that POA's servants
is used for exactly one object id. If the value is 
MULTIPLE_ID, then that POA's servants
support one or more object ids. 
Since, without an Active Object Map (that is, without the 
RETAIN policy), servants are
selected by default or by a servant manager, the value of 
IdUniquenessPolicy is
irrelevant without an Active Object Map. Use the 
UNIQUE_ID policy value when
appropriate to allow a (possible) optimization in the use of the Active Object Map by
the 
POA. 
ImplicitActivationPolicy
Page 5 of 12