throw new org.omg.PortableServer.POAPackage.AdapterAlreadyExists();
//
// If necessary create a new POAManager for this POA
//
POAManager obmanager = null;
if (manager == null) {
try {
org.apache.yoko.orb.OB.InitialServiceManager ism = orbInstance_
.getInitialServiceManager();
POAManagerFactory factory = POAManagerFactoryHelper
.narrow(ism
.resolveInitialReferences("POAManagerFactory"));
org.omg.CORBA.Policy[] emptyPl = new org.omg.CORBA.Policy[0];
obmanager = (org.apache.yoko.orb.OBPortableServer.POAManager) factory
.create_POAManager("", emptyPl);
} catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
org.apache.yoko.orb.OB.Assert._OB_assert(false);
} catch (org.omg.PortableServer.POAManagerFactoryPackage.ManagerAlreadyExists ex) {
org.apache.yoko.orb.OB.Assert._OB_assert(false);
}
// catch(org.apache.yoko.orb.OCI.InvalidParam ex)
// {
// org.apache.yoko.orb.OB.Assert._OB_assert(false);
// }
catch (org.omg.CORBA.PolicyError ex) {
org.apache.yoko.orb.OB.Assert._OB_assert(false);
}
} else {
try {
obmanager = POAManagerHelper.narrow(manager);
} catch (org.omg.CORBA.BAD_PARAM ex) {
org.apache.yoko.orb.OB.Assert._OB_assert(false);
}
}
//
// Create the new POA
//
try {
child = new POA_impl(orb_, orbInstance_, serverId_, adapter,
this, obmanager, poaCurrent_, ociCurrent_, policies,
rawPolicies);
} catch (org.omg.CORBA.SystemException ex) {
//
// If the creation of the POA fails and a new POAManager
// was created the deactivate the POAManager
//
if (manager == null) {
org.apache.yoko.orb.OB.Assert._OB_assert(obmanager != null);
try {
obmanager.deactivate(true, true);
} catch (org.omg.PortableServer.POAManagerPackage.AdapterInactive e) {
}
}
throw ex;
}