use of org.omg.PortableServer.RequestProcessingPolicyValue in project cxf by apache.
the class CorbaDestination method createPOA.
protected POA createPOA(String name, POA parentPOA, POAManager poaManager) {
List<Policy> policies = new ArrayList<>();
policies.add(parentPOA.create_thread_policy(ThreadPolicyValue.ORB_CTRL_MODEL));
if (isPersistent) {
policies.add(parentPOA.create_lifespan_policy(LifespanPolicyValue.PERSISTENT));
} else {
policies.add(parentPOA.create_lifespan_policy(LifespanPolicyValue.TRANSIENT));
}
if (serviceId != null) {
policies.add(parentPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID));
}
policies.add(parentPOA.create_id_uniqueness_policy(IdUniquenessPolicyValue.MULTIPLE_ID));
RequestProcessingPolicyValue value = RequestProcessingPolicyValue.USE_DEFAULT_SERVANT;
policies.add(parentPOA.create_request_processing_policy(value));
orbConfig.addPOAPolicies(orb, name, parentPOA, poaManager, policies);
Policy[] policyList = policies.toArray(new Policy[0]);
try {
return parentPOA.create_POA(name, poaManager, policyList);
} catch (Exception ex) {
throw new CorbaBindingException("Could not create POA during activation", ex);
}
}
Aggregations