Classes | Defines | Functions | Variables

IPC (CORBA) helpers
[Interprocess Communication]

Collaboration diagram for IPC (CORBA) helpers:

Classes

class  ipc_Corba
 CORBA helper class. More...
class  ipc_Log
class  ipc_Init

Defines

#define ipc_CATCH_CORBA_THROW_IVD_m
#define ipc_EXEC_m(_remoteCmds)
#define ipc_CATCH_IVD_THROW_CORBA_m
 This macro is intended to be used in CORBA servant methods to convert ivd and other exceptions to i_IvdException.

Functions

IVD_IPC_DECL_d string ipc_CORBASysExceptionToString (const CORBA::SystemException &a_exc)
IVD_IPC_DECL_d string ipc_CORBAExceptionToString (const CORBA::Exception &a_exc)
 Operator to display a CORBA exception in human readable form to an C++ string.
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const CORBA::SystemException &a_sysExc)
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const CORBA::Exception &a_exc)
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const i_IvdException &a_exc)
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const omniORB::fatalException &a_fe)
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const omni_thread_fatal &otf)
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const omni_thread_invalid &otf)
IVD_IPC_DECL_d ostream & operator<< (ostream &a_os, const CORBA::Object_ptr &a_obj)
 Displays type code ID of the CORBA::Object reference.
void IVD_IPC_DECL_d ipc_ConvertIpcExToIvdEx (i_IvdException &a_ie)
IVD_IPC_DECL_d i_DataBlock_tipc_ReadFromFile (cmn_File &a_file)
 Helper function to read file contents into CORBA octet stream and prepare it for parsing.
IVD_IPC_DECL_d bool ipc_ObjectExists (i_Component_ptr obj)

Variables

const UInt32_t ipc_NS_ACCESS_RETRIES_c
 The number of times that the access to the Naming Service is retried.
IVD_IPC_DECL_d const char *const ipc_nilStr
IVD_IPC_DECL_d const char * ipc_unknownExcLiteral_c
IVD_IPC_DECL_d const char * ipc_corbaFatalExcLiteral_c
IVD_IPC_DECL_d const char * ipc_iIVDExcLiteral_c

Define Documentation

#define ipc_CATCH_CORBA_THROW_IVD_m

Definition at line 256 of file ipc.h.

Referenced by ipc_Corba::Init(), and InitializeIPC().

#define ipc_CATCH_IVD_THROW_CORBA_m

This macro is intended to be used in CORBA servant methods to convert ivd and other exceptions to i_IvdException.

Warning:
Some exceptions are treated as fatal!

Definition at line 308 of file ipc.h.

Referenced by i_ManagementInterface_i::AbortJob(), i_ManagementInterface_i::ActivateFile(), i_ManagementInterface_i::AddDrive(), i_ManagementInterface_i::AddLibrary(), i_ManagementInterface_i::AddMedium(), i_ManagementInterface_i::AddMediumToPool(), i_ManagementInterface_i::AddPartition(), i_ManagementInterface_i::Backup(), i_ManagementInterface_i::CloseVolume(), i_MediumDupl_i::CompleteJob(), i_AdminJob_i::CompleteJob(), i_PartitionManager_i::CopyContents(), i_ManagementInterface_i::DisableLibrary(), i_ManagementInterface_i::DisablePartition(), i_UIMessageServer_i::DisplayResult(), i_ManagementInterface_i::EnableLibrary(), i_ManagementInterface_i::EnablePartition(), i_ManagementInterface_i::FileHistory(), i_ManagementInterface_i::FormatAndInitMedium(), i_ManagementInterface_i::GetCollocationInfo(), i_FSC_i::GetFileHistory(), i_VvCopyJob_i::GetFiles(), i_MediumDupl_i::GetFiles(), i_BackupJob_i::GetFiles(), i_AdminJob_i::GetFiles(), i_VvCopyJob_i::GetFSC(), i_MediumDupl_i::GetFSC(), i_BackupJob_i::GetFSC(), i_AdminJob_i::GetFSC(), i_ManagementInterface_i::GetHl7Info(), i_MediumDupl_i::GetNewResources(), i_BackupJob_i::GetNewResources(), i_ReorgJob_i::GetNextRecallSet(), i_RecallJob_i::GetNextRecallSet(), i_EfficientRecallJob_i::GetNextRecallSet(), i_ManagementInterface_i::JobInfo(), i_ManagementInterface_i::JobInfoDetail(), i_ManagementInterface_i::ListDriveHosts(), i_ManagementInterface_i::ListDrives(), i_ManagementInterface_i::ListLibraries(), i_ManagementInterface_i::ListMedia(), i_ManagementInterface_i::ListMediumVolumes(), i_ManagementInterface_i::ListPartitions(), i_ManagementInterface_i::ListPools(), i_ManagementInterface_i::ListSingleMedium(), i_ManagementInterface_i::ListSlots(), i_LibraryAgentManual_i::Load(), i_ManagementInterface_i::MarkMediumGood(), i_ManagementInterface_i::MarkMediumOffline(), i_ManagementInterface_i::MarkMediumOnline(), i_ManagementInterface_i::MarkMediumUnreliable(), i_ManagementInterface_i::MarkMediumUnusable(), i_ManagementInterface_i::MigrateFile(), i_ManagementInterface_i::PartitionStatus(), i_ManagementInterface_i::PoolReorgStat(), i_PartitionManager_i::ReadCollocationInfo(), i_PartitionManager_i::ReadHl7Info(), i_ManagementInterface_i::RecallFile(), i_PartitionManager_i::RegisterFSID(), i_ManagementInterface_i::ReleaseFile(), i_PartitionManager_i::ReleaseVolEntries(), i_PartitionManager_i::Remove(), i_BackupJob_i::Remove(), i_ManagementInterface_i::RemoveDrive(), i_ManagementInterface_i::RemoveLibrary(), i_ManagementInterface_i::RemoveMedium(), i_ManagementInterface_i::RemovePartition(), i_ManagementInterface_i::RemovePool(), i_PartitionManager_i::Reorg(), i_PartitionManager_i::ReorgByColId(), i_PartitionManager_i::ReorgScan(), i_ManagementInterface_i::ReportAllPartitions(), i_ManagementInterface_i::SetCollocationInfo(), i_ManagementInterface_i::SetHl7Info(), i_ManagementInterface_i::SetPriority(), i_ManagementInterface_i::ShowDrive(), i_ManagementInterface_i::ShowDriveRevs(), i_ManagementInterface_i::ShowLibrary(), i_ManagementInterface_i::ShowLibraryInventory(), i_ManagementInterface_i::ShowLibraryRevs(), i_ManagementInterface_i::ShowPartition(), i_ManagementInterface_i::ShowPartitionRevs(), i_ManagementInterface_i::ShowPool(), i_ManagementInterface_i::ShowSystemCfgRevs(), i_ManagementInterface_i::SystemStatus(), i_PartitionManager_i::TrigDeletion(), i_ManagementInterface_i::TrigDeletion(), i_ManagementInterface_i::TrigMigration(), i_PartitionManager_i::UnRegisterFSID(), i_ManagementInterface_i::UpdateDrive(), i_ManagementInterface_i::UpdateLibrary(), i_ManagementInterface_i::UpdatePartition(), i_ManagementInterface_i::UpdateSystemCfg(), i_PartitionManager_i::WriteCollocationInfo(), and i_PartitionManager_i::WriteHl7Info().

#define ipc_EXEC_m (   _remoteCmds  ) 
Value:
try {                           \
        log_MARKLINE_m;             \
        _remoteCmds;                \
    }                               \
    ipc_CATCH_CORBA_THROW_IVD_m;

Definition at line 294 of file ipc.h.

Referenced by _tmain(), job_Manager::AbortJob(), i_ManagementInterface_i::AbortJob(), i_Job_i::AbortJob(), i_FSCCheckJob_i::AbortJob(), i_Job_i::ActivateBea(), i_ManagementInterface_i::ActivateFile(), i_Job_i::ActivateJob(), ipc_Corba::ActivatePOA(), i_ResourceManager_i::AddDrive(), i_ManagementInterface_i::AddDrive(), i_ManagementInterface_i::AddLibrary(), i_PartitionManager_i::AddMajorCol(), i_ManagementInterface_i::AddMedium(), i_ManagementInterface_i::AddMediumToPool(), i_ManagementInterface_i::AddPartition(), i_ManagementInterface_i::AddPool(), rm_Queue::Allocate(), i_MediumDupl_i::AssignResources(), bea_MigrationThread::bea_MigrationThread(), FileInfoCache::CheckFiles(), pm_JobMgr::CheckFSCvsIVDFS(), i_PartitionManager_i::CheckFSCvsMedia(), i_AdminJob_i::CheckMedium(), i_AdminJob_i::CheckPartition(), i_AdminJob_i::CheckPool(), i_MediumDupl_i::CheckTargetMedium(), i_AdminJob_i::CheckVolumesForFormatAndInit(), i_AdminJob_i::CheckVolumesForFriMicJob(), i_PartitionManager_i::ClearReorgScan(), CliConnectToHSM(), CliConnectToMIF(), i_AdminJob_i::CloseVolume(), bea_FRI::CloseVolumeInRMDB(), i_ThreadJob_i::CompleteJob(), i_RecallJob_i::CompleteJob(), i_MigrationJob_i::CompleteJob(), i_MediumDupl_i::CompleteJob(), i_MaintFriJob_i::CompleteJob(), i_EfficientRecallJob_i::CompleteJob(), Continue(), mif_JobManager::CreateCloseVolumeJob(), mif_JobManager::CreateDuplMedJob(), mif_JobManager::CreateFormatAndInitJob(), api_Partition::CreateMajorCol(), mif_JobManager::CreateRecreateFriAndMicJob(), pm_JobMgr::CreateReorgJob(), i_AdminJob_i::DeleteMedVolFromRMDB(), i_AdminJob_i::DetectVolumeHeader(), i_ManagementInterface_i::DisableDebug(), i_ManagementInterface_i::DisableLibrary(), i_ManagementInterface_i::DisablePartition(), ui_MsgWriter::DisplayError(), ui_MsgWriter::DisplayMessage(), ui_MsgWriter::DisplayResult(), ui_MsgWriter::DisplayWarning(), i_AdminJob_i::DoInitialize(), pm_JobMgr::EfficientRecallGetLocations(), i_ManagementInterface_i::EnableDebug(), i_ManagementInterface_i::EnableLibrary(), i_ManagementInterface_i::EnablePartition(), api_Partition::EnumMajorCollocationId(), api_Partition::EnumMinorCollocationId(), fs_api::EventMounted(), hsm_FileHeader::EventOffline(), i_ResourceManager_i::ExecStartLA(), i_ResourceManager_i::ExecStopLA(), i_VvCopyJob_i::Execute(), i_ReorgScanJob_i::Execute(), i_ReorgJob_i::Execute(), i_RecreatedIVDFSJob_i::Execute(), i_RecallJob_i::Execute(), i_MigrationJob_i::Execute(), i_MediumDupl_i::Execute(), i_MediumCheckJob_i::Execute(), i_FSCCheckJob_i::Execute(), i_BackupJob_i::Execute(), i_AdminJob_i::Execute(), i_ManagementInterface_i::FileHistory(), fsc_nsFSrecovery::FlushBlock(), fsc_ColectorExpFile::FlushPackage(), i_AdminJob_i::Format(), fsc_ColectorExpFile::fsc_ColectorExpFile(), fsc_nsFSrecovery::fsc_nsFSrecovery(), mif_PartMgr::GetAllPartFromRM(), rm_Operator::GetBestCopy(), hsm_FHmigc::GetFileIDs(), api_Partition::GetFileLocations(), i_MaintFriJob_i::GetFRI(), i_ReorgJob_i::GetFSC(), i_RedundantCopyJob_i::GetFSC(), i_RecallJob_i::GetFSC(), i_EfficientRecallJob_i::GetFSC(), i_PartitionManager_i::GetHSM(), i_Job_i::GetJob(), i_Job_i::GetJobParams(), i_PartitionManager_i::GetJobStatus(), i_ManagementInterface_i::GetMediumInfo(), pm_JobMgr::GetNewMigId(), i_ReorgJob_i::GetNewResources(), i_RedundantCopyJob_i::GetNewResources(), i_MigrationJob_i::GetNewResources(), i_BackupJob_i::GetNewResources(), i_ManagementInterface_i::GetPartition(), i_PartitionManager_i::GetPartitionRecord(), i_ManagementInterface_i::GetPartitionStatus(), api_Partition::GetPartitionStatus(), job_Manager::GetRM(), i_BackEndAgent_i::GetRM(), i_PartitionManager_i::GetStatus(), api_Partition::GetVolumeList(), api_Partition::GetVolumeListMajor(), api_Partition::GetVolumeListMinor(), la_SCSILibrary::HandleDriveError(), i_BackEndAgent_i::HandleError(), i_BackEndAgent_i::i_BackEndAgent_i(), i_BackupJob_i::i_BackupJob_i(), i_EfficientRecallJob_i::i_EfficientRecallJob_i(), i_Job_i::i_Job_i(), i_LibraryAgentManual_i::i_LibraryAgentManual_i(), i_LibraryAgentSCSI_i::i_LibraryAgentSCSI_i(), i_ManagementInterface_i::i_ManagementInterface_i(), i_MediumDupl_i::i_MediumDupl_i(), i_MigrationJob_i::i_MigrationJob_i(), i_PartitionManager_i::i_PartitionManager_i(), i_RecallJob_i::i_RecallJob_i(), i_RecoveryJob_i::i_RecoveryJob_i(), i_RedundantCopyJob_i::i_RedundantCopyJob_i(), i_ReorgJob_i::i_ReorgJob_i(), i_ResourceManager_i::i_ResourceManager_i(), i_ThreadJob_i::i_ThreadJob_i(), i_AdminJob_i::Initialize(), i_ReorgJob_i::InitializeSingleVolume(), i_AdminJob_i::InitializeSingleVolume(), i_ReorgJob_i::InitializeVolumes(), i_LibraryAgentSCSI_i::Inventory(), bea_FRIThread::IsClosed(), mif_PartMgr::IsInRecallOnlyMode(), mif_PartMgr::IsMigrateWithCollocationSet(), i_ManagementInterface_i::JobInfo(), api_Partition::JobStatus(), i_PartitionManager_i::LimitedCheckFSCvsMedia(), i_ManagementInterface_i::LimitedCheckFSCvsMedia(), ListAllJobsinRM(), i_ManagementInterface_i::ListDriveHosts(), i_ManagementInterface_i::ListDrives(), i_ManagementInterface_i::ListJob(), i_ManagementInterface_i::ListJobs(), ListJobsinPM(), i_ManagementInterface_i::ListLibraries(), i_ManagementInterface_i::ListMedia(), i_ManagementInterface_i::ListMediumVolumes(), i_ManagementInterface_i::ListPartitions(), i_ManagementInterface_i::ListPools(), i_ManagementInterface_i::ListSingleMedium(), i_ManagementInterface_i::ListSlots(), i_LibraryAgentSCSI_i::Load(), i_LibraryAgentManual_i::Load(), i_Job_i::LoadUnload(), main(), i_ReorgJob_i::MediumOperationComplete(), i_RedundantCopyJob_i::MediumOperationComplete(), i_RecallJob_i::MediumOperationComplete(), i_MigrationJob_i::MediumOperationComplete(), i_MediumDupl_i::MediumOperationComplete(), i_MaintFriJob_i::MediumOperationComplete(), i_EfficientRecallJob_i::MediumOperationComplete(), pm_JobMgr::Migrate(), i_HSM_i::MigrateByAPI(), hsm_JobListMgr::MigrateFailedJob(), i_ManagementInterface_i::MigrateFile(), api_Partition::MigrateFile(), i_ReorgJob_i::MigrateFiles(), i_RedundantCopyJob_i::MigrateFiles(), i_ManagementInterface_i::Mount(), nsc_ScanForIVDFSRecovery(), i_AdminJob_i::OperateLA(), i_PartitionManager_i::ParseConfig(), i_ManagementInterface_i::PartitionReorgStat(), i_ManagementInterface_i::PartitionStatus(), i_ManagementInterface_i::PoolReorgStat(), i_MediumDupl_i::PreFormat(), i_RedundantCopyJob_i::Prepare(), i_MaintFriJob_i::PrepareMedium(), i_RecallJob_i::PrepareResource(), i_EfficientRecallJob_i::PrepareResource(), i_BackupJob_i::PrepareResource(), i_MaintFriJob_i::PrepareVolumes(), i_RecallJob_i::Process(), i_MigrationJob_i::Process(), i_MediumDupl_i::Process(), i_EfficientRecallJob_i::Process(), i_RecoveryJob_i::ProcessFRI(), i_MediumCheckJob_i::ProcessFRI(), bea_FRIThread::ProcessFromDataVol(), ClientConf_t::ReadCollocationConfiguration(), i_LibraryAgentSCSI_i::ReadDriveInfo(), i_LibraryAgentManual_i::ReadDriveInfo(), bea_FRIThread::ReadFromSysVol(), ClientConf_t::ReadHL7Configuration(), ReadRefFromFile(), i_RedundantCopyJob_i::ReadSourceData(), i_ReorgJob_i::ReadSourceVolume(), bea_RecallThread::Recall(), i_ManagementInterface_i::RecallFile(), i_ReorgJob_i::RecallFiles(), i_RedundantCopyJob_i::RecallFiles(), i_RecallJob_i::RecallRetry(), i_PartitionManager_i::RecoveryModeClear(), i_PartitionManager_i::RecoveryModeSet(), i_MaintFriJob_i::RecreateFRI(), i_AdminJob_i::RecreateFRIandMIC(), i_Job_i::ReleaseDiskBuffer(), i_ManagementInterface_i::ReleaseFile(), i_Job_i::ReleaseResource(), i_RecallJob_i::ReleaseResources(), i_MaintFriJob_i::ReleaseResources(), i_EfficientRecallJob_i::ReleaseResources(), i_ResourceManager_i::Remove(), i_PartitionManager_i::Remove(), i_ManagementInterface_i::Remove(), i_ManagementInterface_i::RemoveDrive(), i_ManagementInterface_i::RemoveLibrary(), i_ManagementInterface_i::RemoveMedium(), i_ManagementInterface_i::RemovePartition(), i_ManagementInterface_i::RemovePool(), ui_MsgWriter::RemoveUI(), api_Partition::Reorg(), i_PartitionManager_i::ReorgByColId(), api_Partition::ReorgByColId(), api_Partition::ReorgScan(), i_ReorgJob_i::ReorgStatusCleanup(), i_Job_i::RequestDiskBuffer(), i_BackEndAgent_i::RequestNewResources(), i_MaintFriJob_i::RequestResources(), FSEvMgrThrd::Run(), ipc_Corba::Run(), pm_RecallClientThread::Run(), blk_NetWriter::Run(), blk_NetReader::Run(), hl7::SendBlock(), hsm_FHmigc::SendToPM(), i_Job_i::SetDriveProperties(), i_ManagementInterface_i::SetJobPriority(), i_RecoveryJob_i::SetRecoveryFlagOnVolumes(), api_Partition::SetReferences(), i_PartitionManager_i::SetReorgScan(), i_AdminJob_i::SetVolumes(), i_ManagementInterface_i::ShowDrive(), i_ManagementInterface_i::ShowLibrary(), i_ManagementInterface_i::ShowLibraryInventory(), i_ManagementInterface_i::ShowPartition(), i_ManagementInterface_i::ShowPool(), i_ManagementInterface_i::ShowPoolRevs(), ipc_Corba::Shutdown(), i_Job_i::StartBea(), i_AdminJob_i::StartBEA(), mif_PartMgr::StartPM(), i_PartitionManager_i::StartReorgJob(), mif_PartMgr::StopPM(), Suspend(), i_ManagementInterface_i::TrigDeletion(), i_HSM_i::TrigEfficientRecall(), i_ManagementInterface_i::TrigMigration(), i_HSM_i::TrigRecall(), i_ManagementInterface_i::Umount(), i_LibraryAgentSCSI_i::Unload(), i_LibraryAgentManual_i::Unload(), i_PartitionManager_i::UnRegisterFSID(), i_ManagementInterface_i::UpdateDrive(), i_BackEndAgent_i::UpdateDriveIDs(), i_LibraryAgentSCSI_i::UpdateIDs(), i_ManagementInterface_i::UpdateLibrary(), api_Partition::UpdateMajColSize(), i_PartitionManager_i::UpdateMajorCol(), i_BackEndAgent_i::UpdateMediumIDs(), i_ReorgJob_i::UpdateMediumStatus(), mif_PartMgr::UpdatePart(), i_ManagementInterface_i::UpdatePartition(), i_ManagementInterface_i::UpdatePool(), i_BackEndAgent_i::UseResources(), i_ManagementInterface_i::ValidatePMConfig(), i_ManagementInterface_i::ValidatePoolConfig(), blk_DiskFRIWriter::Write(), WriteRefToFile(), bea_DupReadThread::~bea_DupReadThread(), bea_DupWriteThread::~bea_DupWriteThread(), bea_FRIThread::~bea_FRIThread(), bea_MigrationThread::~bea_MigrationThread(), bea_RecallThread::~bea_RecallThread(), i_AdminJob_i::~i_AdminJob_i(), i_Job_i::~i_Job_i(), i_PartitionManager_i::~i_PartitionManager_i(), i_RedundantCopyJob_i::~i_RedundantCopyJob_i(), i_ReorgJob_i::~i_ReorgJob_i(), and ui_MsgWriter::~ui_MsgWriter().


Function Documentation

void IVD_IPC_DECL_d ipc_ConvertIpcExToIvdEx ( i_IvdException a_ie  ) 

Definition at line 1485 of file ipc_corba.cpp.

References i_IvdException::blockOffset, i_IvdException::code, i_IvdException::detailed, et_IVD_DF_ERROR, et_IVD_ERROR, et_IVD_INTERNAL_ERROR, et_SYS_ERROR, i_IvdException::exceptionType, ie_IPC_UNKNOWN_IVD_EXCEPTION, ivd_Error, and i_IvdException::text.

                                                   {
    switch (a_ie.exceptionType) {
        case et_IVD_INTERNAL_ERROR:
            throw ivd_InternalError(
                ivd_ErrorCode_e(a_ie.code),
                string(a_ie.text), string(a_ie.detailed));
        case et_SYS_ERROR :
            throw ivd_SysError(
                ivd_ErrorCode_e(a_ie.code),
                string(a_ie.text), string(a_ie.detailed));
        case et_IVD_ERROR :
            throw ivd_Error(
                ivd_ErrorCode_e(a_ie.code),
                string(a_ie.text), string(a_ie.detailed));
        case et_IVD_DF_ERROR :
            throw ivd_DFError(
                ivd_ErrorCode_e(a_ie.code),
                a_ie.blockOffset, string(a_ie.text), string(a_ie.detailed));
        default :
            throw ivd_InternalError(
                ie_IPC_UNKNOWN_IVD_EXCEPTION,
                string(a_ie.text), string(a_ie.detailed));
    }
}

IVD_IPC_DECL_d string ipc_CORBAExceptionToString ( const CORBA::Exception &  a_exc  ) 

Operator to display a CORBA exception in human readable form to an C++ string.

(Source: Duncan Grisby on omniORB mailing list)

Definition at line 1388 of file ipc_corba.cpp.

References ipc_corbaLiteral_c().

Referenced by operator<<(), ipc_Corba::Resolve(), and ipc_Corba::ResolveTargetPM().

                                                               {

    try {
        string exText(ipc_corbaLiteral_c);
        exText.reserve(50);

        exText += a_exc._name();

        return exText;
    }
    catch(...) {
        return string("CORBA::Exception?");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_IPC_DECL_d string ipc_CORBASysExceptionToString ( const CORBA::SystemException &  a_exc  ) 

Definition at line 1403 of file ipc_corba.cpp.

References ipc_corbaLiteral_c().

Referenced by operator<<().

                                                                        {

    try {
        string exText(ipc_corbaLiteral_c);
        exText.reserve(80);

        exText += a_exc._name();
        exText += "#";
        exText += a_exc.NP_minorString();

        return exText;
    }
    catch(...) {
        return string("CORBA::SystemException?");
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_IPC_DECL_d bool ipc_ObjectExists ( i_Component_ptr  obj  ) 

Definition at line 85 of file ipc_helpers.cpp.

References dbg_DETAIL, dbg_NORM, ipc_ObjectExists(), log_DBG_m, and log_FUNC_m.

Referenced by i_EfficientRecallJob_i::CompleteJob(), ipc_ObjectExists(), i_MaintFriJob_i::MediumOperationComplete(), i_Job_i::WaitBeasToFinish(), and i_Job_i::~i_Job_i().

                                           {
    log_FUNC_m(ipc_ObjectExists);

    bool exist(true);

    try {
        bool nonExistent(false);
        try {
            if (!CORBA::is_nil(obj)) {
                nonExistent = obj->_non_existent();
            }
            else {
                log_DBG_m(dbg_DETAIL, "Object reference is nil");
                nonExistent = true;
            }
        }
        catch (const CORBA::TRANSIENT&) {
            log_DBG_m(dbg_NORM, "obj->_non_existent() raised CORBA::TRANSIENT exception.");
        }
        catch (...) {
            log_DBG_m(dbg_NORM, "Unknown exception caught while calling obj->_non_existent()");
        }

        if (nonExistent) {
            // Object definitly does not exist
            log_DBG_m(dbg_DETAIL, "Object does not exist.");
            exist = false;
        }
        else {
            // Object maybe exist. Try to "ping" it
            obj->Ping();
        }
    }
    catch (const CORBA::TRANSIENT&) {
        log_DBG_m(dbg_NORM, "Object couldn't be reached, CORBA::TRANSIENT");
        exist = false;
    }
    catch (const CORBA::OBJECT_NOT_EXIST&) {
        log_DBG_m(dbg_NORM, "Object doesn't exist");
        exist = false;
    }
    catch (const CORBA::COMM_FAILURE&) {
        log_DBG_m(dbg_NORM, "Object couldn't be reached, CORBA::COMM_FAILURE");
        exist = false;
    }
    catch (...) {
        log_DBG_m(dbg_NORM, "Unknown exception caught while calling Ping()");
        exist = false;
    }
    return exist;
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_IPC_DECL_d i_DataBlock_t* ipc_ReadFromFile ( cmn_File a_file  ) 

Helper function to read file contents into CORBA octet stream and prepare it for parsing.

Definition at line 55 of file ipc_helpers.cpp.

References cmn_File::CloseF(), dbg_DETAIL, fom_OPEN_EXISTING, fom_READ, ipc_ReadFromFile(), log_DBG_m, log_FUNC_m, cmn_File::OpenF(), cmn_File::ReadF(), and cmn_File::StatF().

Referenced by ipc_ReadFromFile(), main(), i_ManagementInterface_i::ShowDrive(), i_ManagementInterface_i::ShowLibrary(), i_ManagementInterface_i::ShowPartition(), i_ManagementInterface_i::ShowPool(), and i_ManagementInterface_i::ShowSystemCfg().

                                                 {
    log_FUNC_m(ipc_ReadFromFile);

    a_file.OpenF(fom_READ | fom_OPEN_EXISTING);
    log_DBG_m(dbg_DETAIL,"File open.");

    ivd_FileInfo_t fileInfo;
    a_file.StatF(fileInfo);
    log_DBG_m(dbg_DETAIL,"FileSize=" << fileInfo.size);

    CORBA::ULong bufSize(static_cast<CORBA::ULong>(fileInfo.size) + 2);

    i_DataBlock_t_var dataBlock( new i_DataBlock_t(bufSize) );
    dataBlock->length(bufSize);

    log_DBG_m(dbg_DETAIL,"Buffer allocated");

    a_file.ReadF(dataBlock->get_buffer(), bufSize);
    log_DBG_m(dbg_DETAIL,"File written to buffer");
    a_file.CloseF();
    log_DBG_m(dbg_DETAIL,"File Closed");

    dataBlock[bufSize-1]  = '\0';
    dataBlock[bufSize-2]  = '\0';

    return dataBlock._retn();
}

Here is the call graph for this function:

Here is the caller graph for this function:

IVD_IPC_DECL_d ostream & operator<< ( ostream &  a_os,
const omni_thread_invalid &  otf 
)

Definition at line 1446 of file ipc_corba.cpp.

                                                                    {
    a_os << "ATTENTION: omni_thread_invalid.";
    return a_os;
}

IVD_IPC_DECL_d ostream& operator<< ( ostream &  a_os,
const omni_thread_fatal &  otf 
)

Definition at line 1441 of file ipc_corba.cpp.

                                                                  {
    a_os << "ATTENTION: omni_thread_fatal: " << otf.error;
    return a_os;
}

IVD_IPC_DECL_d ostream& operator<< ( ostream &  a_os,
const CORBA::SystemException &  a_sysExc 
)

Definition at line 1425 of file ipc_corba.cpp.

References ipc_CORBASysExceptionToString().

                                                                          {
    // Appends omniORB's proprietary string that describes the
    // system exception better.
    a_os << ipc_CORBASysExceptionToString(a_sysExc);
    return a_os;
}

Here is the call graph for this function:

IVD_IPC_DECL_d ostream& operator<< ( ostream &  a_os,
const omniORB::fatalException &  a_fe 
)

Definition at line 1432 of file ipc_corba.cpp.

                                                                        {
    a_os
        <<"** MAJOR PROBLEM: Caught omniORB::fatalException:" << endl
        << "  file: " << a_fe.file() << endl
        << "  line: " << a_fe.line() << endl
        << "  mesg: " << a_fe.errmsg();
    return a_os;
}

IVD_IPC_DECL_d ostream& operator<< ( ostream &  a_os,
const CORBA::Exception &  a_exc 
)

Definition at line 1420 of file ipc_corba.cpp.

References ipc_CORBAExceptionToString().

                                                                 {
    a_os << ipc_CORBAExceptionToString(a_exc);
    return a_os;
}

Here is the call graph for this function:

IVD_IPC_DECL_d ostream& operator<< ( ostream &  a_os,
const i_IvdException a_exc 
)

Definition at line 1451 of file ipc_corba.cpp.

References i_IvdException::code.

                                                                 {
    a_os << "CORBA::i_IvdException(" << a_exc.code << ")";
    return a_os;
}

IVD_IPC_DECL_d ostream& operator<< ( ostream &  a_os,
const CORBA::Object_ptr &  a_obj 
)

Displays type code ID of the CORBA::Object reference.

(Source: Henning, Vinoski: Advanced CORBA Programming with C++)

Definition at line 1461 of file ipc_corba.cpp.

                                                                  {

    try {
        CORBA::Any anyTmp;
        anyTmp <<= a_obj;
        CORBA::TypeCode_var tc = anyTmp.type();
        const char* p = tc->name();
        a_os << ipc_corbaLiteral_c;
        if (*p != '\0') {
            a_os << p;
        };
        a_os << "#" << tc->id();
    }
    catch(...) {
        a_os << "CORBA::Object?";
    }
    return a_os;
}


Variable Documentation

IVD_IPC_DECL_d const char* ipc_corbaFatalExcLiteral_c
IVD_IPC_DECL_d const char* ipc_iIVDExcLiteral_c
IVD_IPC_DECL_d const char* const ipc_nilStr
const UInt32_t ipc_NS_ACCESS_RETRIES_c

The number of times that the access to the Naming Service is retried.

Referenced by ipc_Corba::Init(), and ipc_Corba::Resolve().

IVD_IPC_DECL_d const char* ipc_unknownExcLiteral_c