instance.get_processmanager_reference();
}
//try to get from the primary process manager
ICosMonitoredThread thread = null;
ICosPlanServer planServer = null;
if (instance.mgrRef1_ != null)
{
try
{
//try to get the active reference from this process manager
thread = instance.mgrRef1_.cosGetActiveCorbaServer(STR_PLAN_SERVER.value);
planServer = ICosPlanServerHelper.narrow(thread);
//make sure it is really in control
if (planServer != null)
{
planServer.cosPollControl();
}
}
catch (Exception ex)
{
logger_.error("Can not get reference to active plan server in primary Process Manager");
logger_.error("Exception: " + ex.toString());
//reset the reference
thread = null;
planServer = null;
}
}
//try to get from the secondary process manager if we still did not get proper reference
if (planServer == null && instance.mgrRef2_ != null)
{
try
{
//try to get the active reference from this process manager
thread = instance.mgrRef1_.cosGetActiveCorbaServer(STR_PLAN_SERVER.value);
planServer = ICosPlanServerHelper.narrow(thread);
//make sure it is really in control
if (planServer != null)
{
planServer.cosPollControl();
}
}
catch (Exception ex)
{
logger_.error("Can not get reference to active plan server in secondary Process Manager");