CORBA Interface Definitions
[Interprocess Communication]

Collaboration diagram for CORBA Interface Definitions:

Detailed Description

Backbone of IVD is implemented using CORBA.

Interfaces are described using CORBA IDL.

Migration of files is shown on the following UML sequence diagram:

IVD-CORBA-migration.gif

CORBA IPC implementation hints

Author:
Matej Kenda, HERMES SoftLab


Classes

class  i_Collection_i
class  i_Component_i
struct  i_VolInfo_t
 Used to get current media info and to specify initialisation parameters. More...
interface  i_BackEndAgent
interface  i_Collection
struct  i_Version
interface  i_Component
struct  i_FSCNumCopVsNumPoolsCheckStatus_t
struct  i_FSCfileState_t
struct  i_FRIBlockInfo_t
struct  i_IvdfsFileInfo_t
struct  i_FileHistory_t
interface  i_FSC
struct  i_FileSystemInfo_t
interface  i_FsEvMgr
struct  i_FileExpiration_t
struct  i_ClientConf_t
struct  i_HsmInfo_t
interface  i_HSM
interface  i_Job
struct  i_JobParams
interface  i_LibraryAgent
struct  i_PartitionInfo_t
interface  i_ManagementInterface
interface  i_UploadAgent
interface  i_DownloadAgent
interface  i_BackupAgent
 Uses UploadAgent to write to named pipe connected to ivddd (writing tape). More...
interface  i_RestoreAgent
 Uses DownloadAgent to read from named pipe connected to ivddd (reading tape). More...
interface  i_PartitionManager
interface  i_ResourceManager
struct  i_Library_t
struct  i_Drive_t
struct  i_MajorCol_t
struct  i_MinorCol_t
struct  i_ColMediaVol_t
struct  i_DriveHost_t
struct  i_DiskSubsys_t
struct  i_Slot_t
struct  i_SlotUpdate_t
 Used to set current state of the library's slots. More...
struct  i_MediaPool_t
struct  i_Medium_t
struct  i_MediumVol_t
struct  i_Partition_t
struct  i_PoolInfo_t
struct  i_VolumeInfo_t
struct  i_MediaInfo_t
interface  i_Service
exception  i_IvdException
 all possible data members from ivd_Exception are included More...
struct  i_FileAge_t
struct  i_File_t
struct  i_JobRequest_t
struct  i_MediumPos_t
struct  i_Resource_t
struct  i_FileLocationData_t
 WARNING: members of this structure must be binary equal to ivd_FileLocationData_t (include/ivd/ivd_FileLocationData_t.h). More...
struct  i_Recall_t
struct  i_ActivateResult_t
struct  i_UIResultCell_t
struct  i_UIResultRow_t
struct  i_UIResult_t
interface  i_UIMessageServer
class  ipc_Corba
 CORBA helper class. More...

Typedefs

typedef sequence< i_VolInfo_ti_VolInfoList_t
typedef sequence
< i_FSCfileState_t
i_FSCfileState_v_t
typedef sequence
< i_IvdfsFileInfo_t
i_IvdfsFileInfo_v_t
typedef sequence< i_FileHistory_ti_FileHistoryList_t
typedef unsigned long long i_CollocationID_t
typedef sequence
< i_CollocationID_t
i_CollocationIDs_t
typedef sequence
< i_FileSystemInfo_t
i_FSInfoList_t
typedef sequence
< i_FileExpiration_t
i_FileExpirationList_t
typedef sequence< i_JobParamsi_JobParamsSeq_t
typedef sequence< i_Jobi_JobList_t
typedef sequence
< i_PartitionInfo_t
i_PartInfoList_t
typedef sequence< i_Library_ti_LibrarySeq_t
typedef sequence< i_Drive_ti_DriveSeq_t
typedef sequence< i_MajorCol_ti_MajorColSeq_t
typedef sequence< i_MinorCol_ti_MinorColSeq_t
typedef sequence< i_ColMediaVol_ti_ColMediaVolSeq_t
typedef sequence< i_DriveHost_ti_DriveHostSeq_t
typedef sequence< i_DiskSubsys_ti_DssSeq_t
typedef sequence< i_Slot_ti_SlotSeq_t
typedef sequence< i_SlotUpdate_ti_UpdateList_t
typedef sequence< i_MediaPool_ti_MediaPoolSeq_t
typedef sequence< i_Medium_ti_MediumSeq_t
typedef sequence< i_MediumVol_ti_MediumVolSeq_t
typedef sequence
< i_MediumVolSeq_t
i_MediumSeqByVol_t
typedef sequence< i_Partition_ti_PartSeq_t
typedef sequence< i_PoolInfo_ti_PoolInfoSeq_t
typedef sequence< i_VolumeInfo_ti_VolumeInfoSeq_t
typedef sequence< i_MediaInfo_ti_MediaInfoSeq_t
typedef unsigned long i_FileID_t
typedef unsigned long long i_MigID_t
 File ID.
typedef unsigned long i_CopyID_t
 Migration ID.
typedef unsigned long i_DataType_t
 Copy ID (used in FSC).
typedef unsigned long i_DBKey_t
 Copy ID (used in FSC).
typedef unsigned long i_Count_t
 RMDB Key.
typedef long i_Index_t
 Any kind of number of elements.
typedef unsigned long long i_FileSize_t
 Any kind of index (revision#, HSM job index, volume #...).
typedef unsigned long i_BlkSize_t
 Files' size, offset and similar.
typedef unsigned long i_VolSize_t
 Tape block size.
typedef unsigned long i_BlkOffset_t
 Volume size in MB.
typedef unsigned long long i_JobID_t
 Absolute block position on media.
typedef long i_Time_t
 Job ID.
typedef long i_Type_t
 Time member/argument.
typedef unsigned long i_BitFlag_t
 Any kind of type (library, medium family...).
typedef unsigned long i_Status_t
 Bitflags (options, capabilities...).
typedef string i_UUID_t
 Various statuses.
typedef unsigned long i_JobType_t
 Stringified UUID.
typedef unsigned long long i_ColID_t
 job type enum as UInt value
typedef sequence< string > i_StringList_t
typedef sequence< long > i_LongList_t
typedef sequence< unsigned long > i_ULongList_t
typedef sequence< unsigned
long long > 
i_ULongLongList_t
typedef sequence< booleani_BoolList_t
typedef sequence< octet > i_DataBlock_t
typedef sequence< i_FileID_ti_FileIDs_t
typedef sequence< i_VolSize_ti_VolSizes_t
typedef sequence< i_JobID_ti_JobIDList_t
typedef sequence< i_Index_ti_VolNumList_t
typedef sequence< i_FileAge_ti_FileAgeList_t
typedef sequence< i_File_ti_FileList_t
typedef sequence< i_FileList_ti_FileGroups_t
typedef sequence< i_JobRequest_ti_JobRequestList_t
typedef sequence< i_MediumPos_ti_MediumPos_v_t
typedef sequence< i_MediumPos_v_ti_CopiesPos_v_t
typedef sequence< i_Resource_ti_ResourceList_t
typedef sequence
< i_FileLocationData_t
i_FileLocationDataList_t
typedef sequence< i_Recall_ti_RecallList_t
typedef sequence
< i_UIResultCell_t
i_UIResultCellSeq_t
typedef sequence< i_UIResultRow_ti_UIResultTable_t

Enumerations

enum  i_VolumeType {
  i_VOL_BLANK, i_VOL_IVD,
  i_VOL_ECMA, i_VOL_TAR,
  i_VOL_OTHER, i_VOL_IVD_NT
}
 Used for detection of current volume. More...
enum  i_SysVolAction_e {
  i_SV_NOTHING, i_SV_OVERWRITE,
  i_SV_APPEND, i_SV_REPLACE
}
 These actions are used when FRIs are recreated on demand using the CLI. More...
enum  i_OSType_e {
  i_Linux, i_Windows,
  i_HPUX, i_OtherOS
}
enum  i_FileSystemStatus_e {
  hsmfs_UNKNOWN, hsmfs_REGULAR,
  hsmfs_WORMFS, hsmfs_LAM,
  hsmfs_LAM_OFFLINE, hsmfs_NOT_ATTACHED,
  hsmfs_NOT_CONFIGURED, hsmfs_NOT_ACTIVE
}
enum  i_FSType_e { i_FST_REGULAR, i_FST_WORM }
enum  i_HsmTask_e { i_htCheckFSCvsIVDFS, i_htCheckFSCvsMedia }
enum  i_JobStatus_e {
  job_NOT_STARTED, job_STARTED,
  job_PRE_MED_PROC, job_MED_PROC,
  job_POST_MED_PROC, job_NA
}
enum  i_JobPriorityMod_e {
  jp_RELATIVE, jp_ABSOLUTE,
  jp_UNKNOWN
}
enum  i_PartitionStatus_e {
  part_UNKNOWN, part_DISABLED,
  part_STOPPED, part_RUNNING,
  part_MOUNTED
}
enum  i_Binaries_e {
  i_IVDFSEVTMGR, i_IVDHSM,
  i_IVDPM, i_IVDRM,
  i_IVDBEA, i_IVDLAS,
  i_IVDLAM, i_IVDDD,
  i_IVD, i_IVDBCK,
  i_IVDRST, i_ECHO,
  i_SENTINEL
}
enum  i_DirectoryType_e {
  dt_ETC, dt_DISKBUF,
  dt_FRI, dt_LOG,
  dt_PART, dt_TMP,
  dt_PIPE
}
 Directory tranfer type to specify the directory where to perform file operations on. More...
enum  i_DbgLevel_e {
  i_dbgLOW, i_dbgNORMAL,
  i_dbgDETAIL
}
 Major or minor collocation ID type. More...
enum  i_ExceptionType_e {
  et_IVD_INTERNAL_ERROR, et_IVD_EXCEPTION,
  et_SYS_ERROR, et_IVD_ERROR,
  et_IVD_DF_ERROR, et_IVD_DB_EXCEPTION,
  et_UNKNOWN_ERROR
}
enum  i_FileState_e {
  fs_NOSTATE, fs_FORMIGRATION,
  fs_DOMIGRATION, fs_MIGRATED
}
enum  i_ResourceBusy_e {
  i_RESOURCE_UNKNOWN, i_MEDIUM_BUSY,
  i_MEDIUM_NOT_AVAILABLE, i_DRIVE_BUSY,
  i_DRIVE_NOT_AVAILABLE, i_PRIORITY_BELOW_THRESHOLD,
  i_LIBRARY_NOT_AVAILABLE, i_MAX_NUM_DRIVES,
  i_COL_GRP_SIZE_EXC
}
enum  i_BufType_t {
  i_DISK_BUF, i_SHMEM_BUF,
  i_REMOTE_BUF, i_NA
}
enum  i_CompletionStatus_e {
  i_SUCCEDED, i_FAILED,
  i_INV_PARAMS, i_CLIENT_ERROR,
  i_CLIENT_NOFILES, i_RESOURCE_ERROR,
  i_FSC_ERROR, i_RMCOPYPOS_ERROR,
  i_NO_HOST, i_LA_ERROR,
  i_SVC_ERROR, i_BEA_ERROR,
  i_MEDIUM_ERROR, i_HW_ERROR,
  i_INV_MEDVOLID, i_DATA_ERROR,
  i_REMOVED, i_ABORTED,
  i_UNKNOWN
}
enum  i_UIResultType_e {
  uires_TEXT, uires_NUM,
  uires_BOOL, uires_RAW,
  uires_LIBRARYSTATUS, uires_SLOTSTATUS,
  uires_DRIVESTATUS, uires_POOLSTATUS,
  uires_PARTITIONSTATUS, uires_PARTITIONACTIVITY,
  uires_MEDIUMSTATUS, uires_VOLUMESTATUS,
  uires_JOBSTATUS, uires_LIBRARYTYPE,
  uires_MEDIAFAMILYTYPE, uires_MEDIAPOOLTYPE,
  uires_SLOTTYPE, uires_MEDIATYPE,
  uires_SYSVOLLOCATION, uires_VOLTYPE,
  uires_NA, uires_FSTYPE,
  uires_JOBTYPE, uires_NO_TYPE
}
enum  i_UIItemType_e {
  uiitem_CELL, uiitem_TABLE,
  uiitem_UNKNOWN
}
enum  i_UIAlignType_e {
  uialign_LEFT, uialign_CENTER,
  uialign_RIGHT
}

Functions

template<class TGT_SEQ_TYPE>
void ipc_ReceiveCompleteCollection (TGT_SEQ_TYPE &a_tgtSeq, i_Collection_ptr a_colref)
 Template function to read all batches from a sequence and append them to the a_tgtSeq.
const UInt32_t ipc_MAX_CONNECTIONS_c (64)
 Maximum connections that are opened by omniORB to another address space.
const UInt32_t ipc_CLIENT_TIMEOUT_MS_c (2 *24 *60 *60 *1000)
 Client side call timeout to prevent starvation (in ms).
const char * ipc_CLIENT_TIMEOUT_ENV_c ("HSM_CALL_TIMEOUT")
 Environment variable to override the default (in ms).
const UInt32_t ipc_NS_ACCESS_RETRIES_c (30)
 How long should the process try to get access to CORBA Naming Service.
const char *const ipc_nilStr ("\0")
static void ipc_DbgOn (log_DbgLevel_t a_level, bool a_verbose)
 Turn on omniORB debugging by changing debug levels.
static void ipc_DbgOff ()
 Turn off omniORB debugging by lowering debug levels.
void ipc_ORBLogCallback (const char *a_logText)
static const char * ipc_corbaLiteral_c ("CORBA::")
const char * ipc_unknownExcLiteral_c ("** Unknown exception **")
const char * ipc_corbaFatalExcLiteral_c ("** CORBA::fatalException: ")
const char * ipc_iIVDExcLiteral_c ("** i_IvdException: ")
string ipc_CORBAExceptionToString (const CORBA::Exception &a_exc)
 Operator to display a CORBA exception in human readable form to an C++ string.
string ipc_CORBASysExceptionToString (const CORBA::SystemException &a_exc)
ostream & operator<< (ostream &a_os, const CORBA::Exception &a_exc)
ostream & operator<< (ostream &a_os, const CORBA::SystemException &a_sysExc)
ostream & operator<< (ostream &a_os, const omniORB::fatalException &a_fe)
ostream & operator<< (ostream &a_os, const omni_thread_fatal &otf)
ostream & operator<< (ostream &a_os, const omni_thread_invalid &otf)
ostream & operator<< (ostream &a_os, const i_IvdException &a_exc)
ostream & operator<< (ostream &a_os, const CORBA::Object_ptr &a_obj)
 Displays type code ID of the CORBA::Object reference.
void ipc_ConvertIpcExToIvdEx (i_IvdException &a_ie)
static ipc_Corbaipc_Corba::Singleton ()
 ipc_Corba::ipc_Corba ()
virtual ipc_Corba::~ipc_Corba ()
void ipc_Corba::StopSignalHandler ()
static void ipc_Corba::Destroy ()
static void ipc_Corba::Init (bool a_waitNamingSvc=true, bool a_shutdownOnSignal=true, int a_argc=0, char *a_argv[]=NULL)
 Initializes ORB and root naming context from Naming service.
static void ipc_Corba::ActivatePOA ()
static void ipc_Corba::RegisterMajorServant (i_Component_i *a_majServant)
static void ipc_Corba::RemoveMajorServant ()
static bool ipc_Corba::IsMajorServant (const i_Component_i *a_obj)
static void ipc_Corba::ResetMajorServant ()
static void ipc_Corba::Run ()
static void ipc_Corba::Shutdown ()
 This function must be called by the destructor of the major servant to shut down the ORB (exit from its run() function).
static void ipc_Corba::RegisterRM (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ipc_Corba::ResolveRM (bool a_wait=true)
static void ipc_Corba::RegisterMIF (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ipc_Corba::ResolveMIF (const string &a_serverHost, bool a_wait=true)
static void ipc_Corba::RegisterPMByPMID (const CORBA::Object_ptr a_objref, const string &a_partID)
static void ipc_Corba::RegisterPMByFSID (const CORBA::Object_ptr a_objref, const string &a_clientHost, const string &a_fsID)
static void ipc_Corba::RegisterPMByDeviceName (const CORBA::Object_ptr a_objref, const string &a_clientHost, const string &a_fsDevName)
static CORBA::Object_ptr ipc_Corba::ResolvePMByPartID (const string &a_serverHost, const string &a_partID, bool a_wait=true)
static CORBA::Object_ptr ipc_Corba::ResolvePMByFSID (const string &a_clientHost, const string &a_fsID, bool a_wait=true)
static CORBA::Object_ptr ipc_Corba::ResolvePMByDeviceName (const string &a_clientHost, const string &a_fsDevName, bool a_wait=true)
static void ipc_Corba::RegisterFSEvtMgr (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ipc_Corba::ResolveFSEvtMgr (const string &a_serverHost, bool a_wait=true)
static void ipc_Corba::RegisterSvc (const CORBA::Object_ptr a_objref)
static CORBA::Object_ptr ipc_Corba::ResolveSvc (const string &a_serverHost, bool a_wait=true)
static void ipc_Corba::RegisterLA (const CORBA::Object_ptr a_objref, const string &a_libraryName)
static CORBA::Object_ptr ipc_Corba::ResolveLA (const string &a_serverHost, const string &a_libraryName, bool a_wait=true)
CORBA::Object_ptr ipc_Corba::ResolveTargetPM (const string &a_serverHost, const string &a_partName)
static const string ipc_Corba::MangledHostName (const string &a_hostName)
 CORBA Naming service treats '.
static const string ipc_Corba::MangledDeviceName (const string &a_devName)
 CORBA Naming service treats '/' as a special character.
static const string ipc_Corba::GetRM_NSEntry ()
static const string ipc_Corba::GetMIF_NSEntry (const string &a_serverHost)
static const string ipc_Corba::GetPMID_NSEntry (const string &a_serverHost, const string &a_partID)
static const string ipc_Corba::GetPMFSID_NSEntry (const string &a_serverHost, const string &a_fsID)
static const string ipc_Corba::GetPMFSName_NSEntry (const string &a_serverHost, const string &a_fsID)
static const string ipc_Corba::GetFSEvtMgr_NSEntry (const string &a_serverHost)
static const string ipc_Corba::GetSvc_NSEntry (const string &a_serverHost)
static const string ipc_Corba::GetLA_NSEntry (const string &a_serverHost, const string &a_libName)
void ipc_Corba::Register (const CORBA::Object_ptr a_objref, const string &a_objectName)
CORBA::Object_ptr ipc_Corba::Resolve (const string &a_objectName, bool a_wait=true)
static void ipc_Corba::InitDebug ()
 Sets pointers to functions that are called at each dbg_On() and dbg_Off().

Variables

class _OMNIORB_NTDLL_IMPORT POA_i_Component
i_MigID_t i_JobParams::migID
long i_JobParams::jobPriority
long i_JobParams::priorityModifier
string i_JobParams::partName
i_UUID_t i_JobParams::partUUID
i_JobType_t i_JobParams::jobType
i_BufType_t i_JobParams::bufType
unsigned long long i_JobParams::bufId
i_Time_t i_JobParams::startTime
i_Index_t i_JobParams::phase
i_Count_t i_JobParams::copies
i_JobStatus_e i_JobParams::status
string i_JobParams::diskBufferFS
static const char s_orbName [] = "omniORB4"
static const CORBA::ULong ipc_Corba::m_dbgLow
static const CORBA::ULong ipc_Corba::m_dbgNorm
static const CORBA::ULong ipc_Corba::m_dbgDetail
static const CORBA::ULong ipc_Corba::m_dbgVerbose
 Verbose level of debugging: up to 128 bytes of GIOP messages are displayed.
static const string ipc_Corba::m_nsIvdPrefix_c = g_cmn.prod.m_nameShort
static const string ipc_Corba::m_nsIvdRM_c = string("rm")
static const string ipc_Corba::m_nsIvdLib_c = string("lib")
static const string ipc_Corba::m_nsIvdMgr_c = string("mgr")
static const string ipc_Corba::m_nsIvdMIF_c = string("mif")
static const string ipc_Corba::m_nsIvdPart_c = string("part")
static const string ipc_Corba::m_nsIvdClt_c = string("clt")
static const string ipc_Corba::m_nsIvdEvtMgr_c = string("fsevtmgr")
static const string ipc_Corba::m_nsIvdFS_c = string("fs")
static const string ipc_Corba::m_nsIvdSvc_c = string("svc")


Typedef Documentation

typedef unsigned long i_BitFlag_t

Any kind of type (library, medium family...).

Definition at line 24 of file i_types.idl.

typedef unsigned long i_BlkOffset_t

Volume size in MB.

Definition at line 20 of file i_types.idl.

typedef unsigned long i_BlkSize_t

Files' size, offset and similar.

Definition at line 18 of file i_types.idl.

typedef sequence<boolean> i_BoolList_t

Definition at line 36 of file i_types.idl.

typedef unsigned long long i_ColID_t

job type enum as UInt value

Definition at line 28 of file i_types.idl.

typedef unsigned long long i_CollocationID_t

Definition at line 69 of file i_fsc.idl.

Definition at line 70 of file i_fsc.idl.

Definition at line 94 of file i_rmtypes.idl.

typedef sequence<i_MediumPos_v_t> i_CopiesPos_v_t

Definition at line 109 of file i_types.idl.

typedef unsigned long i_CopyID_t

Migration ID.

Definition at line 12 of file i_types.idl.

typedef unsigned long i_Count_t

RMDB Key.

Definition at line 15 of file i_types.idl.

typedef sequence<octet> i_DataBlock_t

Definition at line 38 of file i_types.idl.

typedef unsigned long i_DataType_t

Copy ID (used in FSC).

Definition at line 13 of file i_types.idl.

typedef unsigned long i_DBKey_t

Copy ID (used in FSC).

Definition at line 14 of file i_types.idl.

typedef sequence<i_DriveHost_t> i_DriveHostSeq_t

Definition at line 104 of file i_rmtypes.idl.

typedef sequence<i_Drive_t> i_DriveSeq_t

Definition at line 67 of file i_rmtypes.idl.

typedef sequence<i_DiskSubsys_t> i_DssSeq_t

Definition at line 117 of file i_rmtypes.idl.

typedef sequence<i_FileAge_t> i_FileAgeList_t

Definition at line 79 of file i_types.idl.

Definition at line 27 of file i_hsm.idl.

typedef sequence<i_FileList_t> i_FileGroups_t

Definition at line 89 of file i_types.idl.

Definition at line 67 of file i_fsc.idl.

typedef unsigned long i_FileID_t

Definition at line 10 of file i_types.idl.

typedef sequence<i_FileID_t> i_FileIDs_t

Definition at line 39 of file i_types.idl.

typedef sequence<i_File_t> i_FileList_t

Definition at line 88 of file i_types.idl.

Definition at line 254 of file i_types.idl.

typedef unsigned long long i_FileSize_t

Any kind of index (revision#, HSM job index, volume #...).

Definition at line 17 of file i_types.idl.

Definition at line 42 of file i_fsc.idl.

Definition at line 30 of file i_fsevmgr.idl.

typedef long i_Index_t

Any kind of number of elements.

Definition at line 16 of file i_types.idl.

Definition at line 58 of file i_fsc.idl.

typedef unsigned long long i_JobID_t

Absolute block position on media.

Definition at line 21 of file i_types.idl.

typedef sequence<i_JobID_t> i_JobIDList_t

Definition at line 41 of file i_types.idl.

typedef sequence<i_Job> i_JobList_t

Definition at line 45 of file i_jobdef.idl.

typedef sequence<i_JobParams> i_JobParamsSeq_t

Definition at line 42 of file i_jobdef.idl.

Definition at line 97 of file i_types.idl.

typedef unsigned long i_JobType_t

Stringified UUID.

Definition at line 27 of file i_types.idl.

typedef sequence<i_Library_t> i_LibrarySeq_t

Definition at line 37 of file i_rmtypes.idl.

typedef sequence<long> i_LongList_t

Definition at line 33 of file i_types.idl.

typedef sequence<i_MajorCol_t> i_MajorColSeq_t

Definition at line 77 of file i_rmtypes.idl.

typedef sequence<i_MediaInfo_t> i_MediaInfoSeq_t

Definition at line 278 of file i_rmtypes.idl.

typedef sequence<i_MediaPool_t> i_MediaPoolSeq_t

Definition at line 162 of file i_rmtypes.idl.

typedef sequence<i_MediumPos_t> i_MediumPos_v_t

Definition at line 108 of file i_types.idl.

typedef sequence<i_Medium_t> i_MediumSeq_t

Definition at line 190 of file i_rmtypes.idl.

Definition at line 216 of file i_rmtypes.idl.

typedef sequence<i_MediumVol_t> i_MediumVolSeq_t

Definition at line 215 of file i_rmtypes.idl.

typedef unsigned long long i_MigID_t

File ID.

Definition at line 11 of file i_types.idl.

typedef sequence<i_MinorCol_t> i_MinorColSeq_t

Definition at line 86 of file i_rmtypes.idl.

Definition at line 36 of file i_mif.idl.

typedef sequence<i_Partition_t> i_PartSeq_t

Definition at line 231 of file i_rmtypes.idl.

typedef sequence<i_PoolInfo_t> i_PoolInfoSeq_t

Definition at line 251 of file i_rmtypes.idl.

typedef sequence<i_Recall_t> i_RecallList_t

Definition at line 263 of file i_types.idl.

typedef sequence<i_Resource_t> i_ResourceList_t

Definition at line 177 of file i_types.idl.

typedef sequence<i_Slot_t> i_SlotSeq_t

Definition at line 129 of file i_rmtypes.idl.

typedef unsigned long i_Status_t

Bitflags (options, capabilities...).

Definition at line 25 of file i_types.idl.

typedef sequence<string> i_StringList_t

Definition at line 32 of file i_types.idl.

typedef long i_Time_t

Job ID.

Definition at line 22 of file i_types.idl.

typedef long i_Type_t

Time member/argument.

Definition at line 23 of file i_types.idl.

Definition at line 59 of file i_uims.idl.

Definition at line 66 of file i_uims.idl.

typedef sequence<unsigned long> i_ULongList_t

Definition at line 34 of file i_types.idl.

typedef sequence<unsigned long long> i_ULongLongList_t

Definition at line 35 of file i_types.idl.

typedef sequence<i_SlotUpdate_t> i_UpdateList_t

Definition at line 141 of file i_rmtypes.idl.

typedef string i_UUID_t

Various statuses.

Definition at line 26 of file i_types.idl.

typedef sequence<i_VolInfo_t> i_VolInfoList_t

Definition at line 55 of file i_bea.idl.

typedef sequence<i_Index_t> i_VolNumList_t

Definition at line 42 of file i_types.idl.

typedef unsigned long i_VolSize_t

Tape block size.

Definition at line 19 of file i_types.idl.

typedef sequence<i_VolSize_t> i_VolSizes_t

Definition at line 40 of file i_types.idl.

typedef sequence<i_VolumeInfo_t> i_VolumeInfoSeq_t

Definition at line 271 of file i_rmtypes.idl.


Enumeration Type Documentation

Enumerator:
i_IVDFSEVTMGR  used for Execute()
i_IVDHSM 
i_IVDPM 
i_IVDRM 
i_IVDBEA 
i_IVDLAS 
i_IVDLAM 
i_IVDDD 
i_IVD 
i_IVDBCK  used for ExecutePython()
i_IVDRST 
i_ECHO  used for unit test only
i_SENTINEL  sentinel for tables

Definition at line 15 of file i_service.idl.

00015                   {
00017     i_IVDFSEVTMGR,
00018     i_IVDHSM,
00019     i_IVDPM,
00020     i_IVDRM,
00021     i_IVDBEA,
00022     i_IVDLAS,
00023     i_IVDLAM,
00024     i_IVDDD,
00025     i_IVD,
00026 
00028     i_IVDBCK,
00029     i_IVDRST,
00030 
00032     i_ECHO,
00033 
00035     i_SENTINEL
00036 };

Enumerator:
i_DISK_BUF 
i_SHMEM_BUF 
i_REMOTE_BUF 
i_NA 

Definition at line 179 of file i_types.idl.

Enumerator:
i_SUCCEDED 
i_FAILED 
i_INV_PARAMS  Problems with parameters.
i_CLIENT_ERROR  Problems with client connection.
i_CLIENT_NOFILES  No files for migration.
i_RESOURCE_ERROR 
i_FSC_ERROR 
i_RMCOPYPOS_ERROR 
i_NO_HOST  problems finding host for running bea
i_LA_ERROR  Problems with LA commmunication.
i_SVC_ERROR  Problems with SVC commmunication.
i_BEA_ERROR  Back end agent probably did not start.
i_MEDIUM_ERROR 
i_HW_ERROR  Problems with the tape drive.
i_INV_MEDVOLID  BEA got different media volume ID as expected.
i_DATA_ERROR  Problems with dataformat,.
i_REMOVED  Job removed.
i_ABORTED 
i_UNKNOWN 

Definition at line 181 of file i_types.idl.

00181                           {
00182     i_SUCCEDED,         //#0 
00183     i_FAILED,           //#1
00184 
00186     i_INV_PARAMS,       //#2
00187 
00189     i_CLIENT_ERROR,     //#3
00190     
00192     i_CLIENT_NOFILES,   //#4
00193 
00194     //Probles with resource allocation
00195     i_RESOURCE_ERROR,   //#5
00196     
00197     //FSC Error
00198     i_FSC_ERROR,        //#6
00199     
00200     //error finding 
00201     i_RMCOPYPOS_ERROR,  //#7
00202 
00204     i_NO_HOST,          //#8
00205 
00207     i_LA_ERROR,         //#9
00208 
00210     i_SVC_ERROR,        //#10
00211 
00213     i_BEA_ERROR,        //#11
00214 
00215     i_MEDIUM_ERROR,     //#12
00216 
00218     i_HW_ERROR,         //#13
00219 
00221     i_INV_MEDVOLID,     //#14
00222 
00224     i_DATA_ERROR,       //#15
00225 
00227     i_REMOVED,          //#16
00228 
00229     i_ABORTED,          //#17
00230 
00231     i_UNKNOWN           //#18
00232 };

Major or minor collocation ID type.

Enumerator:
i_dbgLOW 
i_dbgNORMAL 
i_dbgDETAIL 

Definition at line 30 of file i_types.idl.

Directory tranfer type to specify the directory where to perform file operations on.

Enumerator:
dt_ETC 
dt_DISKBUF 
dt_FRI 
dt_LOG 
dt_PART 
dt_TMP 
dt_PIPE 

Definition at line 43 of file i_service.idl.

Enumerator:
et_IVD_INTERNAL_ERROR 
et_IVD_EXCEPTION 
et_SYS_ERROR 
et_IVD_ERROR 
et_IVD_DF_ERROR 
et_IVD_DB_EXCEPTION 
et_UNKNOWN_ERROR 

Definition at line 45 of file i_types.idl.

Enumerator:
fs_NOSTATE 
fs_FORMIGRATION 
fs_DOMIGRATION 
fs_MIGRATED 

Definition at line 67 of file i_types.idl.

00067                    {
00068     fs_NOSTATE,         // file undefined state
00069     fs_FORMIGRATION,    // file prepared for migration - to check policies
00070     fs_DOMIGRATION,     // file is migrated to first level (disk or memory cache)
00071     fs_MIGRATED         // file is on the tape
00072 };

Enumerator:
hsmfs_UNKNOWN 
hsmfs_REGULAR 
hsmfs_WORMFS 
hsmfs_LAM 
hsmfs_LAM_OFFLINE 
hsmfs_NOT_ATTACHED 
hsmfs_NOT_CONFIGURED 
hsmfs_NOT_ACTIVE 

Definition at line 14 of file i_fsevmgr.idl.

00014                           {
00015     hsmfs_UNKNOWN,
00016     hsmfs_REGULAR,
00017     hsmfs_WORMFS,
00018     hsmfs_LAM,
00019     hsmfs_LAM_OFFLINE,
00020     hsmfs_NOT_ATTACHED,
00021     hsmfs_NOT_CONFIGURED,
00022     hsmfs_NOT_ACTIVE
00023 };

enum i_FSType_e

Enumerator:
i_FST_REGULAR 
i_FST_WORM 

Definition at line 18 of file i_hsm.idl.

00018                 {
00019     i_FST_REGULAR,
00020     i_FST_WORM
00021 };

Enumerator:
i_htCheckFSCvsIVDFS 
i_htCheckFSCvsMedia 

Definition at line 94 of file i_hsm.idl.

00094                  {
00095     i_htCheckFSCvsIVDFS,
00096     i_htCheckFSCvsMedia
00097 };

Enumerator:
jp_RELATIVE 
jp_ABSOLUTE 
jp_UNKNOWN 

Definition at line 15 of file i_mif.idl.

00015                         {
00016     jp_RELATIVE, //Job Priority has to be change by adding some value
00017     jp_ABSOLUTE, //Job Priority should be set to a number
00018     jp_UNKNOWN
00019 };

Enumerator:
job_NOT_STARTED 
job_STARTED 
job_PRE_MED_PROC 
job_MED_PROC 
job_POST_MED_PROC 
job_NA 

Definition at line 12 of file i_jobdef.idl.

00012                    {
00013     job_NOT_STARTED,
00014     job_STARTED,
00015     job_PRE_MED_PROC,
00016     job_MED_PROC,
00017     job_POST_MED_PROC,
00018     job_NA 
00019 };

enum i_OSType_e

Enumerator:
i_Linux 
i_Windows 
i_HPUX 
i_OtherOS 

Definition at line 12 of file i_component.idl.

Enumerator:
part_UNKNOWN 
part_DISABLED 
part_STOPPED 
part_RUNNING 
part_MOUNTED 

Definition at line 21 of file i_mif.idl.

00021                          {
00022     part_UNKNOWN,
00023     part_DISABLED,
00024     part_STOPPED,
00025     part_RUNNING,
00026     part_MOUNTED
00027 };

Enumerator:
i_RESOURCE_UNKNOWN 
i_MEDIUM_BUSY 
i_MEDIUM_NOT_AVAILABLE 
i_DRIVE_BUSY 
i_DRIVE_NOT_AVAILABLE 
i_PRIORITY_BELOW_THRESHOLD 
i_LIBRARY_NOT_AVAILABLE 
i_MAX_NUM_DRIVES 
i_COL_GRP_SIZE_EXC 

Definition at line 112 of file i_types.idl.

These actions are used when FRIs are recreated on demand using the CLI.

BEA will do the following:

  • i_SV_OVERWRITE: system volume will be deleted at the beginning of the recreate process. All FRIs that are created will be appended to the end of system volume. The final effect is that newly created FRIs will be on the system volume also.

  • i_SV_APPEND: Each created FRI will be appended to the end of the existing FRI.

  • i_SV_REPLACE: Created FRIs will be replaced and others will be preserved as they are. NOT YET IMPLEMENTED: behaves just like i_SV_OVERWRITE.
Enumerator:
i_SV_NOTHING 
i_SV_OVERWRITE 
i_SV_APPEND 
i_SV_REPLACE 

Definition at line 73 of file i_bea.idl.

Enumerator:
uialign_LEFT 
uialign_CENTER 
uialign_RIGHT 

Definition at line 45 of file i_uims.idl.

00045                      {
00046     uialign_LEFT,
00047     uialign_CENTER,
00048     uialign_RIGHT
00049 };

Enumerator:
uiitem_CELL 
uiitem_TABLE 
uiitem_UNKNOWN 

Definition at line 39 of file i_uims.idl.

00039                     {
00040     uiitem_CELL,
00041     uiitem_TABLE,
00042     uiitem_UNKNOWN
00043 };

Enumerator:
uires_TEXT 
uires_NUM 
uires_BOOL 
uires_RAW 
uires_LIBRARYSTATUS 
uires_SLOTSTATUS 
uires_DRIVESTATUS 
uires_POOLSTATUS 
uires_PARTITIONSTATUS 
uires_PARTITIONACTIVITY 
uires_MEDIUMSTATUS 
uires_VOLUMESTATUS 
uires_JOBSTATUS 
uires_LIBRARYTYPE 
uires_MEDIAFAMILYTYPE 
uires_MEDIAPOOLTYPE 
uires_SLOTTYPE 
uires_MEDIATYPE 
uires_SYSVOLLOCATION 
uires_VOLTYPE 
uires_NA 
uires_FSTYPE 
uires_JOBTYPE 
uires_NO_TYPE 

Definition at line 12 of file i_uims.idl.

Used for detection of current volume.

Enumerator:
i_VOL_BLANK 
i_VOL_IVD 
i_VOL_ECMA 
i_VOL_TAR 
i_VOL_OTHER 
i_VOL_IVD_NT 

Definition at line 17 of file i_bea.idl.


Function Documentation

void ipc_Corba::ActivatePOA (  )  [static, inherited]

Definition at line 424 of file ipc_corba.cpp.

References ipc_EXEC_m, log_FUNC_m, ipc_Corba::m_poa, and ipc_Corba::Singleton().

Referenced by CliConnectToHSM(), CliConnectToMIF(), main(), ServerLoop(), and VerifyNS().

00424                             {
00425     log_FUNC_m(ActivatePOA);
00426 
00427     ipc_EXEC_m(
00428 
00429         PortableServer::POAManager_var pman =
00430             ipc_Corba::Singleton().m_poa->the_POAManager();
00431 
00432         pman->activate();
00433     );
00434 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::Destroy ( void   )  [static, inherited]

Definition at line 156 of file ipc_corba.cpp.

References dbg_EXTAPI, dbg_NORM, cmn_Thread::Join(), log_DBG_m, log_FUNC_m, ipc_Corba::m_destroyed, ipc_Corba::m_orb, ipc_Corba::m_shutdownThread, NULL, ipc_Corba::RemoveMajorServant(), ipc_Corba::Singleton(), and ipc_Corba::StopSignalHandler().

Referenced by _tmain(), main(), and api_Base::~api_Base().

00156                         {
00157     log_FUNC_m(Destroy);
00158 
00159     //
00160     // Do a shutdown of servants (noop if already executed)
00161     //
00162     RemoveMajorServant();
00163 
00164     if (ipc_Corba::Singleton().m_shutdownThread != NULL) {
00165         // We initialise the member and work with a copy to
00166         // prevent double Join().
00167         cmn_Thread *thread = ipc_Corba::Singleton().m_shutdownThread;
00168         ipc_Corba::Singleton().m_shutdownThread = NULL;
00169 
00170         ipc_Corba::Singleton().StopSignalHandler();
00171         thread->Join(NULL);
00172     }
00173 
00174     if (!CORBA::is_nil(ipc_Corba::Singleton().m_orb)) {
00175         log_DBG_m(dbg_EXTAPI, "Destroying ORB.");
00176         ipc_Corba::Singleton().m_orb->destroy();
00177         log_DBG_m(dbg_EXTAPI, "ORB destroyed.");
00178     }
00179     else {
00180         log_DBG_m(dbg_NORM, "ORB not initialized, no need to destroy.");
00181     };
00182     ipc_Corba::Singleton().m_destroyed = true;
00183 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetFSEvtMgr_NSEntry ( const string &  a_serverHost  )  [static, protected, inherited]

Definition at line 966 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdClt_c, ipc_Corba::m_nsIvdEvtMgr_c, ipc_Corba::m_nsIvdPrefix_c, and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterFSEvtMgr(), and ipc_Corba::ResolveFSEvtMgr().

00966                                                                       {
00967     string evtEntryName =
00968         m_nsIvdPrefix_c + string("/") +
00969         m_nsIvdClt_c + string("/") +
00970         MangledHostName(a_serverHost) + string("/") +
00971         m_nsIvdEvtMgr_c;
00972 
00973     return evtEntryName;
00974 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetLA_NSEntry ( const string &  a_serverHost,
const string &  a_libName 
) [static, protected, inherited]

Definition at line 993 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdLib_c, ipc_Corba::m_nsIvdPrefix_c, and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterLA(), and ipc_Corba::ResolveLA().

00994                                                          {
00995 
00996     string laEntryName =
00997         m_nsIvdPrefix_c + string("/") +
00998         m_nsIvdLib_c + string("/") +
00999         MangledHostName(a_serverHost)+ string("/") +
01000         a_libName;
01001 
01002     return laEntryName;
01003 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetMIF_NSEntry ( const string &  a_serverHost  )  [static, protected, inherited]

Definition at line 901 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdMgr_c, ipc_Corba::m_nsIvdMIF_c, ipc_Corba::m_nsIvdPrefix_c, and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterMIF(), and ipc_Corba::ResolveMIF().

00901                                                                  {
00902     string mifEntryName =
00903         m_nsIvdPrefix_c + string("/") +
00904         m_nsIvdMgr_c + string("/") +
00905         MangledHostName(a_serverHost) + string("/") +
00906         m_nsIvdMIF_c;
00907 
00908     return mifEntryName;
00909 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetPMFSID_NSEntry ( const string &  a_serverHost,
const string &  a_fsID 
) [static, protected, inherited]

Definition at line 932 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdClt_c, ipc_Corba::m_nsIvdFS_c, ipc_Corba::m_nsIvdPrefix_c, and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterPMByFSID(), and ipc_Corba::ResolvePMByFSID().

00933                                                       {
00934 
00935     string pmEntryName =
00936         m_nsIvdPrefix_c + string("/") +
00937         m_nsIvdClt_c + string("/") +
00938         MangledHostName(a_serverHost) + string("/") +
00939         m_nsIvdFS_c + string("/id/") +
00940         a_fsID;
00941 
00942     return pmEntryName;
00943 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetPMFSName_NSEntry ( const string &  a_serverHost,
const string &  a_fsID 
) [static, protected, inherited]

Definition at line 949 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdClt_c, ipc_Corba::m_nsIvdFS_c, ipc_Corba::m_nsIvdPrefix_c, ipc_Corba::MangledDeviceName(), and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterPMByDeviceName(), and ipc_Corba::ResolvePMByDeviceName().

00950                                                               {
00951 
00952     string pmEntryName =
00953         m_nsIvdPrefix_c + string("/") +
00954         m_nsIvdClt_c + string("/") +
00955         MangledHostName(a_serverHost) + string("/") +
00956         m_nsIvdFS_c + string("/name/") +
00957         MangledDeviceName(a_fsDeviceName);
00958 
00959     return pmEntryName;
00960 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetPMID_NSEntry ( const string &  a_serverHost,
const string &  a_partID 
) [static, protected, inherited]

Definition at line 915 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdMgr_c, ipc_Corba::m_nsIvdPart_c, ipc_Corba::m_nsIvdPrefix_c, and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterPMByPMID(), ipc_Corba::ResolvePMByPartID(), and ipc_Corba::ResolveTargetPM().

00916                                                         {
00917 
00918     string pmEntryName =
00919         m_nsIvdPrefix_c + string("/") +
00920         m_nsIvdMgr_c + string("/") +
00921         MangledHostName(a_serverHost) + string("/") +
00922         m_nsIvdPart_c + string("/") +
00923         a_partID;
00924 
00925     return pmEntryName;
00926 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::GetRM_NSEntry (  )  [static, protected, inherited]

Definition at line 890 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdPrefix_c, and ipc_Corba::m_nsIvdRM_c.

Referenced by ipc_Corba::RegisterRM(), and ipc_Corba::ResolveRM().

00890                                       {
00891     static const string rmEntryName =
00892         m_nsIvdPrefix_c + string("/") + m_nsIvdRM_c;
00893 
00894     return rmEntryName;
00895 }

Here is the caller graph for this function:

const string ipc_Corba::GetSvc_NSEntry ( const string &  a_serverHost  )  [static, protected, inherited]

Definition at line 980 of file ipc_corba.cpp.

References ipc_Corba::m_nsIvdPrefix_c, ipc_Corba::m_nsIvdSvc_c, and ipc_Corba::MangledHostName().

Referenced by ipc_Corba::RegisterSvc(), and ipc_Corba::ResolveSvc().

00980                                                                  {
00981     string svcEntryName =
00982         m_nsIvdPrefix_c + string("/") +
00983         m_nsIvdSvc_c + string("/") +
00984         MangledHostName(a_serverHost);
00985 
00986     return svcEntryName;
00987 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::Init ( bool  a_waitNamingSvc = true,
bool  a_shutdownOnSignal = true,
int  a_argc = 0,
char *  a_argv[] = NULL 
) [static, inherited]

Initializes ORB and root naming context from Naming service.

Stores the references for future use.

TIP: Use a_waitNamingSvc=false in CLI.

Parameters:
a_waitNamingSvc Wait for the naming service to become available
a_argc Optional parameters for ORB passed via CLI
a_argv Optional parameters for ORB passed via CLI

Definition at line 198 of file ipc_corba.cpp.

References cmn_GetEnvVariable(), cmn_SetEnvVariable(), dbg_EXTAPI, dbg_LOW, dbg_NORM, cmn_Global::dirs, ivd_Directories::etc, g_cmn, ie_IPC_FATAL, ie_IPC_NAMESERVICE, ipc_CATCH_CORBA_THROW_IVD_m, ipc_CLIENT_TIMEOUT_ENV_c(), ipc_CLIENT_TIMEOUT_MS_c(), ipc_MAX_CONNECTIONS_c(), ipc_NS_ACCESS_RETRIES_c, ivd_Error, ivd_Sleep, log_DBG_m, log_ERR_m, log_FUNC_m, cmn_SysInfo::m_masterHost, ipc_Corba::m_orb, ipc_Corba::m_poa, ipc_Corba::m_rootContext, ipc_Corba::m_shutdownThread, NULL, s_orbName, cmn_Global::si, ipc_Corba::Singleton(), and cmn_Thread::StartUndetached().

Referenced by CliConnectToHSM(), CliConnectToMIF(), and main().

00198                                                                                               {
00199     log_FUNC_m(Init);
00200 
00201 #if TGT_OS_hpux
00202     const size_t stackSize_c(2*1024*1024);
00203     size_t oldStackSize(0);
00204     log_DBG_m(dbg_LOW, "Setting new default stack: " << stackSize_c);
00205     int retval = pthread_default_stacksize_np(stackSize_c, &oldStackSize);
00206     log_DBG_m(dbg_LOW, "Retval: " << retval << ", old stack size: " << oldStackSize);
00207 #endif
00208 
00209     try { // Initialise the ORB.
00210         char initRef[1024];
00211         char defInitRef[1024];
00212         char maxgiop[1024];
00213         char clienttimeout[1024];
00214 
00215         sprintf(initRef, "NameService=corbaname:iiop:%s:2809", g_cmn.si.m_masterHost.c_str());
00216         sprintf(defInitRef, "corbaloc:iiop:%s:2809", g_cmn.si.m_masterHost.c_str());
00217         //
00218         // See omniORB documentation (Chapter 8) about Connection Management.
00219         // ORBmaxGIOPConnectionPerServer is limited by the max number of
00220         // open file handles (default on RedHat 7.2 is 1024).
00221         //
00222         // The reason for setting this variable is described in bug 110 (Bugzilla).
00223         //
00224         sprintf(maxgiop, "%d", ipc_MAX_CONNECTIONS_c);
00225 
00226         //
00227         // See omniORB documentation (Chapter 4.3) about Client Side options.
00228         //
00229         // The reason for setting this variable is to prevent starvation
00230         // if the Windows external client dies and the sockets are not closed
00231         // (most often case).
00232         //
00233 
00234         string clTimeoutStr = cmn_GetEnvVariable(ipc_CLIENT_TIMEOUT_ENV_c);
00235 
00236         if (clTimeoutStr.empty()) {
00237             sprintf(clienttimeout, "%d", ipc_CLIENT_TIMEOUT_MS_c);
00238         }
00239         else {
00240             log_DBG_m(dbg_LOW, ipc_CLIENT_TIMEOUT_ENV_c << "=" << clTimeoutStr);
00241             sprintf(clienttimeout, "%s", clTimeoutStr.c_str());
00242         }
00243 
00244         // ORB options
00245     /* const char* options[][2]  = {
00246             {"InitRef",                     initRef},
00247             {"DefaultInitRef",              defInitRef},
00248             {"maxGIOPConnectionPerServer",  maxgiop},
00249             {"clientCallTimeOutPeriod",     clienttimeout},
00250             {"nativeCharCodeSet",           "UTF-8"},
00251             {NULL, NULL}
00252         };*/
00253 
00254     // Previous initialization will not work on HP-UX, so we redefine this array initialization
00255     const char* options[6][2];
00256         options[0][0] = "InitRef";
00257         options[0][1] = initRef;
00258         options[1][0] = "DefaultInitRef";
00259         options[1][1] = defInitRef;
00260         options[2][0] = "maxGIOPConnectionPerServer";
00261         options[2][1] = maxgiop;
00262         options[3][0] = "clientCallTimeOutPeriod";
00263         options[3][1] = clienttimeout;
00264         options[4][0] = "nativeCharCodeSet";
00265         options[4][1] = "UTF-8";
00266         options[5][0] = NULL;
00267         options[5][1] = NULL;
00268 
00269         log_DBG_m(dbg_EXTAPI, "ORB parameters:" << endl <<
00270             "InitRef = " << initRef << endl <<
00271             "DefaultInitRef = " << defInitRef << endl <<
00272             "maxGIOPConnectionPerServer = " << maxgiop << endl <<
00273             "clientCallTimeOutPeriod = " << clienttimeout << endl <<
00274             "nativeCharCodeSet = " << "UTF-8" );
00275 
00276         string cfgFile = g_cmn.dirs.etc + "omniORB.cfg";
00277 
00278         log_DBG_m(dbg_EXTAPI,
00279             "Set EV: OMNIORB_CONFIG = \""<< cfgFile << "\"");
00280 
00281 
00282 #if TGT_OS_windows
00283         // omniORB uses posix (not Win32) functions for reading
00284         // env. variables.
00285         {
00286             static char env[1024];
00287             sprintf(env, "OMNIORB_CONFIG=%s\0", cfgFile.c_str());
00288             _putenv(env);
00289         }
00290 #else
00291         cmn_SetEnvVariable("OMNIORB_CONFIG", cfgFile);
00292 #endif
00293 
00294         log_DBG_m(dbg_EXTAPI, "Initializing ORB.");
00295         ipc_Corba::Singleton().m_orb = CORBA::ORB_init(a_argc, a_argv, s_orbName, options);
00296 
00297         // Obtain a reference to the root POA.
00298         log_DBG_m(dbg_EXTAPI, "Obtaining reference to RootPOA.");
00299         CORBA::Object_var obj =
00300             ipc_Corba::Singleton().m_orb->resolve_initial_references("RootPOA");
00301         ipc_Corba::Singleton().m_poa = PortableServer::POA::_narrow(obj);
00302 
00303         try { // Obtain a reference to the root context of the Name service:
00304             log_DBG_m(dbg_EXTAPI, "Getting reference to NameService.");
00305 
00306             CORBA::Object_var obj;
00307 
00308             // Do retries if COMM_FAILURE occurs.
00309             // It most probably means that NS is currently not available
00310             // This situation can happen at system startup.
00311 
00312             ivd_Time_t timeNSStart = time(NULL);
00313 
00314             // Trying to get the reference to NS for 30 seconds.
00315             while(1) {
00316                 ivd_Time_t now;
00317 
00318                 try {
00319                     obj = ipc_Corba::Singleton().m_orb->resolve_initial_references("NameService");
00320                     // System exception here ^^^ if naming service can't be located
00321 
00322                     // Narrow the reference returned.
00323                     ipc_Corba::Singleton().m_rootContext = CosNaming::NamingContext::_narrow(obj);
00324 
00325                     // Break the loop if everything is OK.
00326                     break;
00327                 }
00328                 catch (CORBA::TRANSIENT&) {
00329                     if (!a_waitNamingSvc) {
00330                         log_DBG_m(dbg_LOW, "Can't contact Naming Service on host " <<
00331                                            g_cmn.si.m_masterHost.c_str() << ".");
00332                         throw;
00333                     };
00334                     now = time(NULL);
00335                     if ( (now - timeNSStart) > ipc_NS_ACCESS_RETRIES_c) {
00336                         // Timeout elapsed. Will not continue.
00337                         log_ERR_m(
00338                             "Timeout elapsed when trying to access " <<
00339                             "CORBA Naming Service. " << endl <<
00340                             "NS not running or host can't be reached. " <<
00341                             "Giving up." << endl <<
00342                             "m_orb->resolve_initial_references(\"NameService\")" );
00343                         throw;
00344                     }
00345                 }
00346                 catch (CORBA::COMM_FAILURE&) {
00347                     if (!a_waitNamingSvc) {
00348                         log_DBG_m(dbg_LOW, "Can't contact Naming Service on host " <<
00349                                            g_cmn.si.m_masterHost.c_str() << ".");
00350                         throw;
00351                     };
00352                     now = time(NULL);
00353                     if ( (now - timeNSStart) > ipc_NS_ACCESS_RETRIES_c) {
00354                         // Timeout elapsed. Will not continue.
00355                         log_ERR_m(
00356                             "Timeout elapsed when trying to access " <<
00357                             "CORBA Naming Service. " << endl <<
00358                             "NS not running or host can't be reached. " <<
00359                             "Giving up." << endl <<
00360                             "m_orb->resolve_initial_references(\"NameService\")" );
00361                         throw;
00362                     }
00363                 }
00364                 catch (CORBA::OBJECT_NOT_EXIST&) {
00365                     if (!a_waitNamingSvc) {
00366                         log_DBG_m(dbg_LOW, "Can't contact Naming Service on host " <<
00367                                            g_cmn.si.m_masterHost.c_str() << ".");
00368                         throw;
00369                     };
00370                     now = time(NULL);
00371                     if ( (now - timeNSStart) > ipc_NS_ACCESS_RETRIES_c) {
00372                         // Timeout elapsed. Will not continue.
00373                         log_ERR_m(
00374                             "Timeout elapsed when trying to access " <<
00375                             "CORBA Naming Service. " << endl <<
00376                             "NS not running or host can't be reached. " <<
00377                             "Giving up." << endl <<
00378                             "m_orb->resolve_initial_references(\"NameService\")" );
00379                         throw;
00380                     }
00381                 }
00382                 {
00383                     log_DBG_m(dbg_NORM,
00384                         "Communication problems accessing Naming Service on host " <<
00385                         g_cmn.si.m_masterHost.c_str() <<
00386                         ". Retrying in 1 sec.");
00387                     ivd_Sleep(1);
00388                 }
00389             } // while
00390 
00391             if( CORBA::is_nil(ipc_Corba::Singleton().m_rootContext) ) {
00392                 // IMPOSSIBLE SITUATION (corrupted ORB)
00393                 throw ivd_InternalError(
00394                     ie_IPC_NAMESERVICE,
00395                     "Failed to narrow to CosNaming::NamingContext. Is ORB corrupted?"
00396                 );
00397             }
00398         }
00399         catch(CORBA::ORB::InvalidName&) {
00400             // IMPOSSIBLE SITUATION (corrupted ORB)
00401             throw ivd_Error(
00402                 ie_IPC_NAMESERVICE,
00403                 "Invalid name of NameService. Is ORB corrupted?", true
00404             );
00405         }
00406     }
00407     ipc_CATCH_CORBA_THROW_IVD_m
00408     catch(...) {
00409         throw ivd_InternalError(ie_IPC_FATAL, "Caught unknown exception.", true);
00410     }
00411 
00412     {
00413         log_DBG_m(dbg_NORM, "Starting shutdown handler thread.");
00414         ipc_Corba::Singleton().m_shutdownThread = new ipc_Shutdown(a_shutdownOnSignal);
00415         ipc_Corba::Singleton().m_shutdownThread->StartUndetached();
00416     }
00417     // ORB and naming service initialized.
00418 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::InitDebug (  )  [static, inherited]

Sets pointers to functions that are called at each dbg_On() and dbg_Off().

Sets callback function that is called by omniORB4.

Definition at line 1307 of file ipc_corba.cpp.

References dbg_SetExternalDebugger(), ipc_DbgOff(), ipc_DbgOn(), and ipc_ORBLogCallback().

Referenced by CliConnectToHSM(), CliConnectToMIF(), and main().

01307                           {
01308     dbg_SetExternalDebugger(ipc_DbgOn, ipc_DbgOff);
01309 
01310     omniORB::setLogFunction(ipc_ORBLogCallback);
01311 }

Here is the call graph for this function:

Here is the caller graph for this function:

const char* ipc_CLIENT_TIMEOUT_ENV_c ( "HSM_CALL_TIMEOUT"   ) 

Environment variable to override the default (in ms).

Referenced by ipc_Corba::Init().

Here is the caller graph for this function:

const UInt32_t ipc_CLIENT_TIMEOUT_MS_c ( 2 *24 *60 *60 *  1000  ) 

Client side call timeout to prevent starvation (in ms).

Referenced by ipc_Corba::Init().

Here is the caller graph for this function:

void ipc_ConvertIpcExToIvdEx ( i_IvdException a_ie  ) 

Definition at line 1469 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.

01469                                                    {
01470     switch (a_ie.exceptionType) {
01471         case et_IVD_INTERNAL_ERROR:
01472             throw ivd_InternalError(
01473                 ivd_ErrorCode_e(a_ie.code),
01474                 string(a_ie.text), string(a_ie.detailed));
01475         case et_SYS_ERROR :
01476             throw ivd_SysError(
01477                 ivd_ErrorCode_e(a_ie.code),
01478                 string(a_ie.text), string(a_ie.detailed));
01479         case et_IVD_ERROR :
01480             throw ivd_Error(
01481                 ivd_ErrorCode_e(a_ie.code),
01482                 string(a_ie.text), string(a_ie.detailed));
01483         case et_IVD_DF_ERROR :
01484             throw ivd_DFError(
01485                 ivd_ErrorCode_e(a_ie.code),
01486                 a_ie.blockOffset, string(a_ie.text), string(a_ie.detailed));
01487         default :
01488             throw ivd_InternalError(
01489                 ie_IPC_UNKNOWN_IVD_EXCEPTION,
01490                 string(a_ie.text), string(a_ie.detailed));
01491     }
01492 }

ipc_Corba::ipc_Corba (  )  [private, inherited]

Definition at line 119 of file ipc_corba.cpp.

References log_FUNC_m.

00120     : m_inShutdown(false),
00121       m_destroyed(false),
00122       m_shutdownThread(NULL),
00123       m_majorServant(NULL) {
00124 
00125     log_FUNC_m(ipc_Corba);
00126 }

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 1372 of file ipc_corba.cpp.

References ipc_corbaLiteral_c().

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

01372                                                                {
01373 
01374     try {
01375         string exText(ipc_corbaLiteral_c);
01376         exText.reserve(50);
01377 
01378         exText += a_exc._name();
01379 
01380         return exText;
01381     }
01382     catch(...) {
01383         return string("CORBA::Exception?");
01384     }
01385 }

Here is the call graph for this function:

Here is the caller graph for this function:

const char* ipc_corbaFatalExcLiteral_c ( "** CORBA::fatalException: "   ) 

static const char* ipc_corbaLiteral_c ( "CORBA::"   )  [static]

Referenced by ipc_CORBAExceptionToString(), ipc_CORBASysExceptionToString(), and operator<<().

Here is the caller graph for this function:

string ipc_CORBASysExceptionToString ( const CORBA::SystemException &  a_exc  ) 

Definition at line 1387 of file ipc_corba.cpp.

References ipc_corbaLiteral_c().

Referenced by operator<<().

01387                                                                         {
01388 
01389     try {
01390         string exText(ipc_corbaLiteral_c);
01391         exText.reserve(80);
01392 
01393         exText += a_exc._name();
01394         exText += "#";
01395         exText += a_exc.NP_minorString();
01396 
01397         return exText;
01398     }
01399     catch(...) {
01400         return string("CORBA::SystemException?");
01401     }
01402 }

Here is the call graph for this function:

Here is the caller graph for this function:

static void ipc_DbgOff (  )  [static]

Turn off omniORB debugging by lowering debug levels.

Definition at line 1354 of file ipc_corba.cpp.

Referenced by ipc_Corba::InitDebug().

01354                          {
01355     omniORB::traceLevel = 0;
01356     omniORB::traceInvocations = false;
01357 }

Here is the caller graph for this function:

static void ipc_DbgOn ( log_DbgLevel_t  a_level,
bool  a_verbose 
) [static]

Turn on omniORB debugging by changing debug levels.

Debugging verbosity depends on both IVD debug level and verbosity flag.

Parameters:
a_level Debug level as specified by parameters
a_verbose Turn on verbose 3rd party debugging

Definition at line 1324 of file ipc_corba.cpp.

References dbg_DETAIL, dbg_EXTAPI, dbg_LOW, dbg_NORM, ipc_Corba::m_dbgDetail, ipc_Corba::m_dbgLow, ipc_Corba::m_dbgNorm, and ipc_Corba::m_dbgVerbose.

Referenced by ipc_Corba::InitDebug().

01324                                                               {
01325 
01326     if (a_verbose) {
01327         switch (a_level) {
01328             case dbg_LOW: omniORB::traceLevel = ipc_Corba::m_dbgLow; break;
01329             case dbg_NORM: omniORB::traceLevel = ipc_Corba::m_dbgNorm; break;
01330             case dbg_EXTAPI: omniORB::traceLevel = ipc_Corba::m_dbgDetail; break;
01331             case dbg_DETAIL: omniORB::traceLevel = ipc_Corba::m_dbgVerbose; break;
01332             default: omniORB::traceLevel = ipc_Corba::m_dbgNorm; break;
01333         }
01334     }
01335     else {
01336         switch (a_level) {
01337             case dbg_LOW: omniORB::traceLevel = ipc_Corba::m_dbgLow; break;
01338             case dbg_NORM: omniORB::traceLevel = ipc_Corba::m_dbgLow; break;
01339             case dbg_EXTAPI: omniORB::traceLevel = ipc_Corba::m_dbgNorm; break;
01340             case dbg_DETAIL: omniORB::traceLevel = ipc_Corba::m_dbgNorm; break;
01341             default: omniORB::traceLevel = ipc_Corba::m_dbgLow; break;
01342         }
01343     };
01344     omniORB::traceInvocations = true;
01345 }

Here is the caller graph for this function:

const char* ipc_iIVDExcLiteral_c ( "** i_IvdException: "   ) 

const UInt32_t ipc_MAX_CONNECTIONS_c ( 64   ) 

Maximum connections that are opened by omniORB to another address space.

Referenced by ipc_Corba::Init().

Here is the caller graph for this function:

const char* const ipc_nilStr ( "\0"   ) 

const UInt32_t ipc_NS_ACCESS_RETRIES_c ( 30   ) 

How long should the process try to get access to CORBA Naming Service.

void ipc_ORBLogCallback ( const char *  a_logText  ) 

Definition at line 1283 of file ipc_corba.cpp.

References dbg_EXTAPI, dbg_IsActive(), log_DBG_m, log_ERR_m, log_FUNC_m, and log_FUNCTAG_m.

Referenced by ipc_Corba::InitDebug().

01283                                                {
01284     if ( dbg_IsActive() ) {
01285         log_FUNCTAG_m(ipc_ORBLogCallback);
01286         log_DBG_m(dbg_EXTAPI, a_logText);
01287     }
01288     else {
01289         log_FUNC_m(ipc_ORBLogCallback);
01290         // Even if debugging is not running
01291         // critical errors are logged in the error.log file, because
01292         // ipc_DbgOff() sets trace level to 0 (critical errors only).
01293         log_ERR_m(a_logText);
01294     };
01295 }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TGT_SEQ_TYPE>
void ipc_ReceiveCompleteCollection ( TGT_SEQ_TYPE &  a_tgtSeq,
i_Collection_ptr  a_colref 
) [inline]

Template function to read all batches from a sequence and append them to the a_tgtSeq.

Definition at line 56 of file i_collection_impl.h.

References ie_IPC_ANY_TYPE, ivd_Error, len, and NULL.

00056                                                                                           {
00057 
00058         CORBA::Boolean more;
00059         do {
00060             CORBA::Any_var a = a_colref->NextBatch(more);
00061 
00062             TGT_SEQ_TYPE* batch(NULL);
00063             if (a >>= batch) {
00064                 CORBA::ULong len = a_tgtSeq.length();
00065                 CORBA::ULong blen = batch->length();
00066                 a_tgtSeq.length(len + blen);
00067                 for (CORBA::ULong i(0), j(len); i < blen; ++i, ++j) {
00068                     a_tgtSeq[j] = (*batch)[i];
00069                 }
00070             }
00071             else {
00072                 CORBA::TypeCode_var tc = a->type();
00073                 ostringstream sstr;
00074                 sstr
00075                     << "CORBA::Any doesn't contain expected type, but: "
00076                     << tc->name() << ".";
00077                 throw ivd_Error(ie_IPC_ANY_TYPE, sstr.str(), true);
00078             }
00079         } while (more);
00080     }

const char* ipc_unknownExcLiteral_c ( "** Unknown exception **"   ) 

bool ipc_Corba::IsMajorServant ( const i_Component_i a_obj  )  [static, inherited]

Definition at line 475 of file ipc_corba.cpp.

References ipc_Corba::m_majorServant, and ipc_Corba::Singleton().

Referenced by i_Component_i::Remove().

00475                                                          {
00476     return (ipc_Corba::Singleton().m_majorServant == a_obj);
00477 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::MangledDeviceName ( const string &  a_devName  )  [static, protected, inherited]

CORBA Naming service treats '/' as a special character.

Therefore we must convert all '/' to '$'

Definition at line 876 of file ipc_corba.cpp.

References cmn_StrLowerCase().

Referenced by ipc_Corba::GetPMFSName_NSEntry().

00876                                                                  {
00877     string mangledDevice = a_devName;
00878     cmn_StrLowerCase(mangledDevice);
00879     for (string::size_type i = 0; i < mangledDevice.length(); i++) {
00880         if (mangledDevice[i] == '/') mangledDevice[i] = '$';
00881     }
00882 
00883     return mangledDevice;
00884 }

Here is the call graph for this function:

Here is the caller graph for this function:

const string ipc_Corba::MangledHostName ( const string &  a_hostName  )  [static, protected, inherited]

CORBA Naming service treats '.

' as a special character. Therefore we must convert all '.' to '@'.

Definition at line 859 of file ipc_corba.cpp.

References cmn_StrLowerCase().

Referenced by ipc_Corba::GetFSEvtMgr_NSEntry(), ipc_Corba::GetLA_NSEntry(), ipc_Corba::GetMIF_NSEntry(), ipc_Corba::GetPMFSID_NSEntry(), ipc_Corba::GetPMFSName_NSEntry(), ipc_Corba::GetPMID_NSEntry(), and ipc_Corba::GetSvc_NSEntry().

00859                                                                 {
00860     string mangledHost = a_hostName;
00861     cmn_StrLowerCase(mangledHost);
00862     for (string::size_type i = 0; i < mangledHost.length(); i++) {
00863         if (mangledHost[i] == '.') mangledHost[i] = '@';
00864     }
00865     return mangledHost;
00866 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 1445 of file ipc_corba.cpp.

References ipc_corbaLiteral_c().

01445                                                                   {
01446 
01447     try {
01448         CORBA::Any anyTmp;
01449         anyTmp <<= a_obj;
01450         CORBA::TypeCode_var tc = anyTmp.type();
01451         const char* p = tc->name();
01452         a_os << ipc_corbaLiteral_c;
01453         if (*p != '\0') {
01454             a_os << p;
01455         };
01456         a_os << "#" << tc->id();
01457     }
01458     catch(...) {
01459         a_os << "CORBA::Object?";
01460     }
01461     return a_os;
01462 }

Here is the call graph for this function:

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

Definition at line 1435 of file ipc_corba.cpp.

References i_IvdException::code.

01435                                                                  {
01436     a_os << "CORBA::i_IvdException(" << a_exc.code << ")";
01437     return a_os;
01438 }

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

Definition at line 1430 of file ipc_corba.cpp.

01430                                                                     {
01431     a_os << "ATTENTION: omni_thread_invalid.";
01432     return a_os;
01433 }

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

Definition at line 1425 of file ipc_corba.cpp.

01425                                                                   {
01426     a_os << "ATTENTION: omni_thread_fatal: " << otf.error;
01427     return a_os;
01428 }

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

Definition at line 1416 of file ipc_corba.cpp.

01416                                                                         {
01417     a_os
01418         <<"** MAJOR PROBLEM: Caught omniORB::fatalException:" << endl
01419         << "  file: " << a_fe.file() << endl
01420         << "  line: " << a_fe.line() << endl
01421         << "  mesg: " << a_fe.errmsg();
01422     return a_os;
01423 }

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

Definition at line 1409 of file ipc_corba.cpp.

References ipc_CORBASysExceptionToString().

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

Here is the call graph for this function:

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

Definition at line 1404 of file ipc_corba.cpp.

References ipc_CORBAExceptionToString().

01404                                                                  {
01405     a_os << ipc_CORBAExceptionToString(a_exc);
01406     return a_os;
01407 }

Here is the call graph for this function:

void ipc_Corba::Register ( const CORBA::Object_ptr  a_objref,
const string &  a_objectName 
) [protected, inherited]

Definition at line 1009 of file ipc_corba.cpp.

References dbg_DETAIL, dbg_EXTAPI, dbg_LOW, dbg_NORM, ie_IPC_OBJ_ACTIVE, ie_IPC_ORB, ie_IPC_REGISTER, ipc_CATCH_CORBA_THROW_IVD_m, ivd_Error, log_DBG_m, log_FUNC_A_m, log_MARKLINE_m, ipc_Corba::m_orb, and ipc_Corba::m_rootContext.

Referenced by ipc_Corba::RegisterFSEvtMgr(), ipc_Corba::RegisterLA(), ipc_Corba::RegisterMIF(), ipc_Corba::RegisterPMByDeviceName(), ipc_Corba::RegisterPMByFSID(), ipc_Corba::RegisterPMByPMID(), ipc_Corba::RegisterRM(), ipc_Corba::RegisterSvc(), and ipc_Corba::RegisterUT().

01009                                                                                    {
01010     log_FUNC_A_m(Register,
01011         "obj id " << a_objref <<
01012         ", name " << a_objectName
01013     );
01014 
01015     if (CORBA::is_nil(m_orb) == true) {
01016         log_MARKLINE_m;
01017         throw ivd_InternalError(
01018             ie_IPC_ORB,
01019             "ORB is not yet initialized. Use Init(argv, argc)",
01020             true
01021         );
01022     }
01023 
01024     log_DBG_m(dbg_NORM,
01025         "Object id : " << a_objref);
01026 
01027     log_DBG_m(dbg_DETAIL,
01028         "Object reference : " << CORBA::String_var(m_orb->object_to_string(a_objref)));
01029 
01030     try {
01031         string          objPath = a_objectName;
01032         string          name;
01033         CosNaming::Name ctxName;
01034 
01035         // Bind all contexts (similar to directories) first
01036         if (objPath.at(0) == '/') {
01037             objPath = objPath.substr(1);
01038         }
01039         while (true) {
01040             size_t slashPos = objPath.find_first_of('/');
01041             if (slashPos == string::npos) {
01042                 name = objPath;
01043                 // Break out of "endless" loop here
01044                 break;
01045             }
01046             else {
01047                 name = objPath.substr(0, slashPos);
01048                 objPath = objPath.substr(slashPos+1);
01049             }
01050 
01051             CORBA::ULong    pathSize = ctxName.length();
01052             // Increase sequence
01053             ctxName.length(pathSize+1);
01054             ctxName[pathSize].id = name.c_str();
01055 
01056             CosNaming::NamingContext_var ctx;
01057             try {
01058                 log_DBG_m(dbg_EXTAPI, "Binding context: " << name);
01059                 ctx = m_rootContext->bind_new_context(ctxName);
01060             }
01061             catch(CosNaming::NamingContext::AlreadyBound&) {
01062                 // If the context already exists, this exception will be raised.
01063                 // In this case, just resolve the name and assign ctx
01064                 // to the object returned:
01065                 log_DBG_m(dbg_DETAIL, "Already bound (rebinding context)");
01066 
01067                 CORBA::Object_var obj;
01068                 obj = m_rootContext->resolve(ctxName);
01069                 CosNaming::NamingContext_var ctx;
01070                 ctx = CosNaming::NamingContext::_narrow(obj);
01071                 if( CORBA::is_nil(ctx) ) {
01072                     log_MARKLINE_m;
01073                     throw ivd_Error(
01074                         ie_IPC_REGISTER,
01075                         "Can't bind context " + name + ". Maybe it is not a context?",
01076                         true
01077                     );
01078                 }
01079             }
01080         }
01081 
01082         // Check if the existing object reference is still alive
01083         // if the new object reference is not nil
01084         if (!CORBA::is_nil(a_objref)) {
01085             try {
01086                 CosNaming::Name_var name =
01087                     omni::omniURI::stringToName(a_objectName.c_str());
01088                 CORBA::Object_var prevObj = m_rootContext->resolve(name);
01089 
01090                 if (!CORBA::is_nil(prevObj) && !prevObj->_non_existent()) {
01091                     // An object is already active on this node.
01092                     // Prevent overwriting!
01093                     log_MARKLINE_m;
01094                     throw ivd_Error(ie_IPC_OBJ_ACTIVE, "Object: " + a_objectName);
01095                 }
01096             }
01097             catch (CORBA::SystemException&) {
01098                 log_DBG_m(dbg_NORM,
01099                     "Caught CORBA::SystemException. Assuming object not active.");
01100             }
01101             catch(CosNaming::NamingContext::NotFound&) {
01102                 log_DBG_m(dbg_NORM,
01103                     "Caught CosNaming::NamingContext::NotFound. " <<
01104                     "Assuming object not active.");
01105             }
01106         }
01107         else {
01108             // empty
01109             // allow overwriting IOR if writing nil IOR
01110             log_DBG_m(dbg_LOW, "Writing nil IOR to object " << a_objectName);
01111         }
01112 
01113         // else bind object reference (similar to file).
01114 
01115         CORBA::ULong    pathSize = ctxName.length();
01116         // Increase sequence
01117         ctxName.length(pathSize+1);
01118         ctxName[pathSize].id = name.c_str();
01119 
01120         try {
01121             log_DBG_m(dbg_EXTAPI, "Binding object name: " << name);
01122             m_rootContext->bind(ctxName, a_objref);
01123         }
01124         catch(CosNaming::NamingContext::AlreadyBound&) {
01125             log_DBG_m(dbg_EXTAPI, "Already bound (rebinding)");
01126             m_rootContext->rebind(ctxName, a_objref);
01127         }
01128     }
01129     ipc_CATCH_CORBA_THROW_IVD_m;
01130 }

Here is the caller graph for this function:

void ipc_Corba::RegisterFSEvtMgr ( const CORBA::Object_ptr  a_objref  )  [static, inherited]

Definition at line 658 of file ipc_corba.cpp.

References g_cmn, ipc_Corba::GetFSEvtMgr_NSEntry(), log_FUNC_m, cmn_SysInfo::m_hostName, ipc_Corba::Register(), cmn_Global::si, and ipc_Corba::Singleton().

Referenced by main().

00658                                                                {
00659     log_FUNC_m(RegisterFSEvtMgr);
00660 
00661     ipc_Corba::Singleton().Register(
00662         a_objref, GetFSEvtMgr_NSEntry(g_cmn.si.m_hostName) );
00663 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterLA ( const CORBA::Object_ptr  a_objref,
const string &  a_libraryName 
) [static, inherited]

Definition at line 700 of file ipc_corba.cpp.

References g_cmn, ipc_Corba::GetLA_NSEntry(), log_FUNC_m, cmn_SysInfo::m_hostName, ipc_Corba::Register(), cmn_Global::si, and ipc_Corba::Singleton().

Referenced by main().

00702                                  {
00703 
00704     log_FUNC_m(RegisterLA);
00705     ipc_Corba::Singleton().Register(
00706         a_objref, GetLA_NSEntry(g_cmn.si.m_hostName, a_libraryName) );
00707 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterMajorServant ( i_Component_i a_majServant  )  [static, inherited]

Definition at line 440 of file ipc_corba.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_m, ipc_Corba::m_majorServant, and ipc_Corba::Singleton().

Referenced by CliConnectToMIF(), i_BackEndAgent_i::i_BackEndAgent_i(), and main().

00440                                                                 {
00441     log_FUNC_m(RegisterMajorServant);
00442 
00443     log_DBG_m(dbg_LOW, "Registering major servant: " << a_majServant);
00444     ipc_Corba::Singleton().m_majorServant = a_majServant;
00445 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterMIF ( const CORBA::Object_ptr  a_objref  )  [static, inherited]

Definition at line 551 of file ipc_corba.cpp.

References g_cmn, ipc_Corba::GetMIF_NSEntry(), log_FUNC_m, cmn_SysInfo::m_hostName, ipc_Corba::Register(), cmn_Global::si, and ipc_Corba::Singleton().

Referenced by i_ManagementInterface_i::i_ManagementInterface_i().

00551                                                           {
00552     log_FUNC_m(RegisterMIF);
00553 
00554     ipc_Corba::Singleton().Register(
00555         a_objref, GetMIF_NSEntry(g_cmn.si.m_hostName) );
00556 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterPMByDeviceName ( const CORBA::Object_ptr  a_objref,
const string &  a_clientHost,
const string &  a_fsDevName 
) [static, inherited]

Definition at line 601 of file ipc_corba.cpp.

References ipc_Corba::GetPMFSName_NSEntry(), log_FUNC_m, ipc_Corba::Register(), and ipc_Corba::Singleton().

Referenced by i_PartitionManager_i::i_PartitionManager_i(), and i_PartitionManager_i::RefreshCfg().

00604                                {
00605 
00606     log_FUNC_m(RegisterPMByDeviceName);
00607 
00608     ipc_Corba::Singleton().Register(
00609         a_objref, GetPMFSName_NSEntry(a_clientHost, a_fsDevName) );
00610 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterPMByFSID ( const CORBA::Object_ptr  a_objref,
const string &  a_clientHost,
const string &  a_fsID 
) [static, inherited]

Definition at line 586 of file ipc_corba.cpp.

References ipc_Corba::GetPMFSID_NSEntry(), log_FUNC_m, ipc_Corba::Register(), and ipc_Corba::Singleton().

Referenced by i_PartitionManager_i::RegisterFSID(), and i_PartitionManager_i::UnRegisterFSID().

00589                           {
00590 
00591     log_FUNC_m(RegisterPMByFSID);
00592 
00593     ipc_Corba::Singleton().Register(
00594         a_objref, GetPMFSID_NSEntry(a_clientHost, a_fsID) );
00595 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterPMByPMID ( const CORBA::Object_ptr  a_objref,
const string &  a_partID 
) [static, inherited]

Definition at line 572 of file ipc_corba.cpp.

References g_cmn, ipc_Corba::GetPMID_NSEntry(), log_FUNC_m, cmn_SysInfo::m_hostName, ipc_Corba::Register(), cmn_Global::si, and ipc_Corba::Singleton().

Referenced by i_PartitionManager_i::i_PartitionManager_i().

00574                             {
00575 
00576     log_FUNC_m(RegisterPMByPMID);
00577 
00578     ipc_Corba::Singleton().Register(
00579         a_objref, GetPMID_NSEntry(g_cmn.si.m_hostName, a_partID) );
00580 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterRM ( const CORBA::Object_ptr  a_objref  )  [static, inherited]

Definition at line 531 of file ipc_corba.cpp.

References ipc_Corba::GetRM_NSEntry(), log_FUNC_m, ipc_Corba::Register(), and ipc_Corba::Singleton().

Referenced by i_ResourceManager_i::i_ResourceManager_i().

00531                                                          {
00532     log_FUNC_m(RegisterRM);
00533 
00534     ipc_Corba::Singleton().Register(a_objref, GetRM_NSEntry());
00535 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RegisterSvc ( const CORBA::Object_ptr  a_objref  )  [static, inherited]

Definition at line 679 of file ipc_corba.cpp.

References g_cmn, ipc_Corba::GetSvc_NSEntry(), log_FUNC_m, cmn_SysInfo::m_hostName, ipc_Corba::Register(), cmn_Global::si, and ipc_Corba::Singleton().

Referenced by main().

00679                                                           {
00680     log_FUNC_m(RegisterSvc);
00681 
00682     ipc_Corba::Singleton().Register(
00683         a_objref, GetSvc_NSEntry(g_cmn.si.m_hostName) );
00684 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::RemoveMajorServant (  )  [static, inherited]

Definition at line 451 of file ipc_corba.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_m, ipc_Corba::m_majorServant, ipc_Corba::m_majorServantRemoveLock, NULL, i_Component_i::Remove(), ipc_Corba::Shutdown(), and ipc_Corba::Singleton().

Referenced by ipc_Corba::Destroy(), and ipc_Shutdown::RunUndetached().

00451                                    {
00452     log_FUNC_m(RemoveMajorServant);
00453 
00454     cmn_MutexLock l(ipc_Corba::Singleton().m_majorServantRemoveLock);
00455     if (ipc_Corba::Singleton().m_majorServant != NULL) {
00456         log_DBG_m(dbg_LOW,
00457             "Removing major servant. It will do cleanup and ORB shutdown.");
00458 
00459         // Major (principal) servant must call Shutdown in its
00460         // destructor.
00461         ipc_Corba::Singleton().m_majorServant->Remove();
00462     }
00463     else {
00464         log_DBG_m(dbg_LOW, "No major servant registered. Just shut down ORB.");
00465 
00466         // Otherwise just do a Shutdown.
00467         ipc_Corba::Shutdown();
00468     }
00469 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::ResetMajorServant (  )  [static, inherited]

Definition at line 479 of file ipc_corba.cpp.

References ipc_Corba::m_majorServant, NULL, and ipc_Corba::Singleton().

Referenced by i_Component_i::Remove().

00479                                   {
00480     ipc_Corba::Singleton().m_majorServant = NULL;
00481 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Object_ptr ipc_Corba::Resolve ( const string &  a_objectName,
bool  a_wait = true 
) [protected, inherited]

Definition at line 1136 of file ipc_corba.cpp.

References dbg_DETAIL, dbg_EXTAPI, dbg_LOW, dbg_NORM, ie_IPC_ORB, ie_IPC_ORB_EXCEPTION, ie_IPC_RESOLVE, ie_TIMEOUT, ipc_CATCH_CORBA_THROW_IVD_m, ipc_CORBAExceptionToString(), ipc_NS_ACCESS_RETRIES_c, ivd_Error, ivd_Sleep, log_DBG_m, log_ERR_m, log_FUNC_A_m, log_MARKLINE_m, ipc_Corba::m_orb, ipc_Corba::m_rootContext, and NULL.

Referenced by ipc_Corba::ResolveFSEvtMgr(), ipc_Corba::ResolveLA(), ipc_Corba::ResolveMIF(), ipc_Corba::ResolvePMByDeviceName(), ipc_Corba::ResolvePMByFSID(), ipc_Corba::ResolvePMByPartID(), ipc_Corba::ResolveRM(), ipc_Corba::ResolveSvc(), and ipc_Corba::ResolveUT().

01136                                                                           {
01137     log_FUNC_A_m(Resolve,
01138         "Name: " << a_objectName <<
01139         " Wait: " << (a_wait? "Yes" : "No") );
01140 
01141     if (CORBA::is_nil(m_orb) == true) {
01142         log_MARKLINE_m;
01143         throw ivd_InternalError(
01144             ie_IPC_ORB,
01145             "ORB is not yet initialized. Use Init(argv, argc)",
01146             true
01147         );
01148     }
01149 
01150     try {
01151         // Resolve the name to an object reference.
01152         log_DBG_m(dbg_EXTAPI, "Getting object reference of " << a_objectName.c_str());
01153         CosNaming::Name_var name =
01154             omni::omniURI::stringToName( a_objectName.c_str() );
01155 
01156         log_DBG_m(dbg_DETAIL, "After omniURI::stringToName.");
01157 
01158         CORBA::Object_var obj;
01159 
01160         // Do retries if object can't be accessed.
01161         // It most probably means that NS is currently not available
01162         // or that the object is not (yet) ready (System Startup).
01163 
01164         ivd_Time_t timeResStart = time(NULL);
01165 
01166         while(1) {
01167             ivd_Time_t now;
01168 
01169             try {
01170                 obj = m_rootContext->resolve(name);
01171                 if (!CORBA::is_nil(obj) && !obj->_non_existent()) {
01172                     // It is OK. Object reference resolved.
01173 
01174                     log_DBG_m(dbg_DETAIL,
01175                         "Seems like a valid reference.");
01176 
01177                     break;
01178                 }
01179                 // Resolved reference is NIL or non-existent.
01180                 if (!a_wait) {
01181                     log_DBG_m(dbg_NORM,
01182                         "Won't wait for the object to become available. returning _nil().");
01183 
01184                     return CORBA::Object::_nil();
01185                 }
01186                 now = time(NULL);
01187                 if ( (now - timeResStart) > ipc_NS_ACCESS_RETRIES_c) {
01188                     // Timeout elapsed. Will not continue.
01189                     log_ERR_m(
01190                         "Timeout accessing object. " <<
01191                         "Most probably not available. Giving up." << endl <<
01192                         a_objectName);
01193                     throw ivd_Error(ie_TIMEOUT, "Object: " + a_objectName);
01194                 }
01195             }
01196             catch (CORBA::COMM_FAILURE&) {
01197                 now = time(NULL);
01198                 if ( !a_wait || (now - timeResStart) > ipc_NS_ACCESS_RETRIES_c) {
01199                     // Timeout elapsed. Will not continue.
01200                     log_DBG_m(dbg_LOW,
01201                         "Problems accessing Naming Service/(Object?). " <<
01202                         "Most probably not running. Giving up." << endl <<
01203                         a_objectName);
01204                     throw;
01205                 }
01206             }
01207             catch (CORBA::TRANSIENT& e) {
01208                 now = time(NULL);
01209                 if ( !a_wait || (now - timeResStart) > ipc_NS_ACCESS_RETRIES_c) {
01210                     // Timeout elapsed. Will not continue.
01211                     log_DBG_m(dbg_LOW,
01212                         "Problems accessing Naming Service/(Object?). " <<
01213                         "Most probably not running. Giving up." << endl <<
01214                         a_objectName);
01215                     //
01216                     // This is to avoid too many entries to error.log:
01217                     // TRANSIENT can mean that the process (object) is not yet running
01218                     //
01219                     throw ivd_Error(
01220                         ie_IPC_ORB_EXCEPTION, ipc_CORBAExceptionToString(e));
01221                 }
01222             }
01223             catch(CORBA::INV_OBJREF&) {
01224                 now = time(NULL);
01225                 if ( !a_wait || (now - timeResStart) > ipc_NS_ACCESS_RETRIES_c) {
01226                     // Timeout elapsed. Will not continue.
01227                     log_ERR_m(
01228                         "Invalid object reference. " <<
01229                         "Most probably not available any more. Giving up." << endl <<
01230                         a_objectName);
01231                     throw;
01232                 }
01233             }
01234             catch(CORBA::OBJECT_NOT_EXIST&) {
01235                 now = time(NULL);
01236                 if ( !a_wait || (now - timeResStart) > ipc_NS_ACCESS_RETRIES_c) {
01237                     // Timeout elapsed. Will not continue.
01238                     log_DBG_m(dbg_LOW,
01239                         "Object does not exist. Giving up." << endl <<
01240                         a_objectName);
01241                     throw;
01242                 }
01243             }
01244             catch(CosNaming::NamingContext::NotFound&) {
01245                 // This exception is thrown if any of the components of the
01246                 // path [contexts or the object] isn't found:
01247                 now = time(NULL);
01248                 if ( !a_wait || (now - timeResStart) > ipc_NS_ACCESS_RETRIES_c) {
01249                     //
01250                     // Throw exception, but don't log unsuccessful resolving immediately.
01251                     // Leave this to the caller.
01252                     //
01253                     throw ivd_Error(
01254                         ie_IPC_RESOLVE,
01255                         "Requested name does not yet exist in the NameService. Giving up. " +
01256                         a_objectName
01257                     );
01258                 }
01259             }
01260             {
01261                 log_DBG_m(dbg_NORM,
01262                     "Problems accessing Naming Service or object. Retrying in 1 sec.");
01263                 ivd_Sleep(1);
01264             }
01265         };
01266 
01267         // Reference resolved, return a duplicate.
01268 
01269         log_DBG_m(dbg_NORM, "Object id : " << obj);
01270         log_DBG_m(dbg_DETAIL, "Object ref : " << CORBA::String_var(m_orb->object_to_string(obj)));
01271 
01272         return obj._retn();
01273     }
01274     ipc_CATCH_CORBA_THROW_IVD_m;
01275 
01276     return CORBA::Object::_nil();
01277 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Object_ptr ipc_Corba::ResolveFSEvtMgr ( const string &  a_serverHost,
bool  a_wait = true 
) [static, inherited]

Definition at line 669 of file ipc_corba.cpp.

References ipc_Corba::GetFSEvtMgr_NSEntry(), log_FUNC_m, ipc_Corba::Resolve(), and ipc_Corba::Singleton().

Referenced by i_ManagementInterface_i::DisableDebug(), i_ManagementInterface_i::EnableDebug(), main(), and mif_PartMgr::SendClientFSIDs().

00669                                                                                   {
00670     log_FUNC_m(ResolveFSEvtMgr);
00671 
00672     return ipc_Corba::Singleton().Resolve(GetFSEvtMgr_NSEntry(a_serverHost), a_wait);
00673 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Object_ptr ipc_Corba::ResolveLA ( const string &  a_serverHost,
const string &  a_libraryName,
bool  a_wait = true 
) [static, inherited]

CORBA::Object_ptr ipc_Corba::ResolveMIF ( const string &  a_serverHost,
bool  a_wait = true 
) [static, inherited]

Definition at line 562 of file ipc_corba.cpp.

References ipc_Corba::GetMIF_NSEntry(), log_FUNC_m, ipc_Corba::Resolve(), and ipc_Corba::Singleton().

Referenced by CliConnectToMIF(), and main().

00562                                                                              {
00563     log_FUNC_m(ResolveMIF);
00564 
00565     return ipc_Corba::Singleton().Resolve(GetMIF_NSEntry(a_serverHost), a_wait);
00566 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Object_ptr ipc_Corba::ResolvePMByDeviceName ( const string &  a_clientHost,
const string &  a_fsDevName,
bool  a_wait = true 
) [static, inherited]

Definition at line 644 of file ipc_corba.cpp.

References ipc_Corba::GetPMFSName_NSEntry(), log_FUNC_m, ipc_Corba::Resolve(), and ipc_Corba::Singleton().

Referenced by main().

00647                  {
00648 
00649     log_FUNC_m(ResolvePMByDeviceName);
00650 
00651     return ipc_Corba::Singleton().Resolve(GetPMFSName_NSEntry(a_clientHost, a_fsDevName), a_wait);
00652 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Object_ptr ipc_Corba::ResolvePMByFSID ( const string &  a_clientHost,
const string &  a_fsID,
bool  a_wait = true 
) [static, inherited]

Definition at line 630 of file ipc_corba.cpp.

References ipc_Corba::GetPMFSID_NSEntry(), log_FUNC_m, ipc_Corba::Resolve(), and ipc_Corba::Singleton().

Referenced by i_ManagementInterface_i::ActivateFile(), i_ManagementInterface_i::FileHistory(), i_ManagementInterface_i::MigrateFile(), i_ManagementInterface_i::RecallFile(), and i_ManagementInterface_i::ReleaseFile().

00633                  {
00634 
00635     log_FUNC_m(ResolvePMByFSID);
00636 
00637     return ipc_Corba::Singleton().Resolve(GetPMFSID_NSEntry(a_clientHost, a_fsID), a_wait);
00638 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Object_ptr ipc_Corba::ResolvePMByPartID ( const string &  a_serverHost,
const string &  a_partID,
bool  a_wait = true 
) [static, inherited]

CORBA::Object_ptr ipc_Corba::ResolveRM ( bool  a_wait = true  )  [static, inherited]

CORBA::Object_ptr ipc_Corba::ResolveSvc ( const string &  a_serverHost,
bool  a_wait = true 
) [static, inherited]

CORBA::Object_ptr ipc_Corba::ResolveTargetPM ( const string &  a_serverHost,
const string &  a_partName 
) [inherited]

Definition at line 727 of file ipc_corba.cpp.

References dbg_DETAIL, dbg_EXTAPI, dbg_LOW, dbg_NORM, ipc_Corba::GetPMID_NSEntry(), ie_IPC_ORB, ie_IPC_ORB_EXCEPTION, ie_IPC_RESOLVE, ie_NOFINDOBJ, ipc_CATCH_CORBA_THROW_IVD_m, ipc_CORBAExceptionToString(), ivd_Error, log_DBG_m, log_ERR_m, log_FUNC_A_m, log_MARKLINE_m, and ipc_Corba::m_orb.

Referenced by i_PartitionManager_i::GetReplicationPM().

00729                               {
00730 
00731     log_FUNC_A_m(ResolveTargetPM,
00732         "Server: " << a_serverHost <<
00733         " Partition: " << a_partName );
00734 
00735     if (CORBA::is_nil(m_orb) == true) {
00736         log_MARKLINE_m;
00737         throw ivd_InternalError(
00738             ie_IPC_ORB,
00739             "ORB is not yet initialized. Use Init(argv, argc)",
00740             true
00741         );
00742     }
00743 
00744     try {
00745         CosNaming::NamingContext_var nsContext;
00746         {
00747             // Resolve the naming service reference
00748             log_DBG_m(dbg_EXTAPI, "Getting object reference of NS on " << a_serverHost);
00749             string objectUri = string("corbaname:iiop:") + a_serverHost + string(":2809");
00750             log_DBG_m(dbg_LOW, "Resolving uri: " << objectUri);
00751             CORBA::Object_var obj = m_orb->string_to_object(objectUri.c_str());
00752             log_DBG_m(dbg_LOW, "URI resolved.");
00753             nsContext = CosNaming::NamingContext::_narrow(obj);
00754 
00755             if (CORBA::is_nil(nsContext)) {
00756                 throw ivd_Error(ie_NOFINDOBJ, "Can't contact Naming Service on target host.");
00757             }
00758         }
00759 
00760         // resolve PM
00761         string objectName(GetPMID_NSEntry(a_serverHost, a_partName));
00762         CosNaming::Name_var name = omni::omniURI::stringToName(objectName.c_str());
00763 
00764         log_DBG_m(dbg_DETAIL, "After omniURI::stringToName.");
00765 
00766         CORBA::Object_var obj;
00767         try {
00768             obj = nsContext->resolve(name);
00769             if (!CORBA::is_nil(obj) && !obj->_non_existent()) {
00770                 // It is OK. Object reference resolved.
00771                 log_DBG_m(dbg_DETAIL,
00772                     "Seems like a valid reference.");
00773             }
00774             else {
00775                 // Resolved reference is NIL or non-existent.
00776                 log_DBG_m(dbg_NORM,
00777                     "Won't wait for the object to become available. returning _nil().");
00778 
00779                 return CORBA::Object::_nil();
00780             }
00781         }
00782         catch (CORBA::COMM_FAILURE&) {
00783             log_DBG_m(dbg_LOW,
00784                 "Problems accessing Naming Service/(Object?). " <<
00785                 "Most probably not running. Giving up." << endl <<
00786                 objectName);
00787             throw;
00788         }
00789         catch (CORBA::TRANSIENT& e) {
00790             log_DBG_m(dbg_LOW,
00791                 "Problems accessing Naming Service/(Object?). " <<
00792                 "Most probably not running. Giving up." << endl <<
00793                 objectName);
00794             //
00795             // This is to avoid too many entries to error.log:
00796             // TRANSIENT can mean that the process (object) is not yet running
00797             //
00798             throw ivd_Error(
00799                 ie_IPC_ORB_EXCEPTION, ipc_CORBAExceptionToString(e));
00800         }
00801         catch(CORBA::INV_OBJREF&) {
00802             log_ERR_m(
00803                 "Invalid object reference. " <<
00804                 "Most probably not available any more. Giving up." << endl <<
00805                 objectName);
00806             throw;
00807         }
00808         catch(CORBA::OBJECT_NOT_EXIST&) {
00809             log_DBG_m(dbg_LOW,
00810                 "Object does not exist. Giving up." << endl <<
00811                 objectName);
00812             throw;
00813         }
00814         catch(CosNaming::NamingContext::NotFound&) {
00815             // This exception is thrown if any of the components of the
00816             // path [contexts or the object] isn't found:
00817             throw ivd_Error(
00818                 ie_IPC_RESOLVE,
00819                 "Requested name does not yet exist in the NameService. Giving up. " +
00820                 objectName
00821             );
00822         }
00823 
00824         // Reference resolved, return a duplicate.
00825         log_DBG_m(dbg_NORM, "PM Object id : " << obj);
00826         log_DBG_m(dbg_DETAIL, "PM Object ref : " << CORBA::String_var(m_orb->object_to_string(obj)));
00827 
00828         return obj._retn();
00829     }
00830     ipc_CATCH_CORBA_THROW_IVD_m;
00831 
00832     return CORBA::Object::_nil();
00833 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::Run (  )  [static, inherited]

Definition at line 487 of file ipc_corba.cpp.

References dbg_NORM, ipc_EXEC_m, ipc_Corba::IsInShutdown(), log_DBG_m, log_FUNC_m, ipc_Corba::m_orb, and ipc_Corba::Singleton().

Referenced by _tmain(), main(), and ServerLoop().

00487                     {
00488     log_FUNC_m(Run);
00489     if (ipc_Corba::IsInShutdown()){
00490         log_DBG_m(dbg_NORM, "ORB already in shutdown.")
00491         return;
00492     }
00493 
00494     ipc_EXEC_m (
00495         ipc_Corba::Singleton().m_orb->run();
00496     );
00497 
00498 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ipc_Corba::Shutdown (  )  [static, inherited]

This function must be called by the destructor of the major servant to shut down the ORB (exit from its run() function).

Definition at line 508 of file ipc_corba.cpp.

References dbg_EXTAPI, dbg_LOW, ipc_EXEC_m, ipc_Corba::IsInShutdown(), log_DBG_m, log_FUNC_m, ipc_Corba::m_inShutdown, ipc_Corba::m_orb, and ipc_Corba::Singleton().

Referenced by ipc_Corba::RemoveMajorServant(), i_BackEndAgent_i::~i_BackEndAgent_i(), i_HSM_i::~i_HSM_i(), i_IvdNet_i::~i_IvdNet_i(), i_LibraryAgentManual_i::~i_LibraryAgentManual_i(), i_LibraryAgentSCSI_i::~i_LibraryAgentSCSI_i(), i_ManagementInterface_i::~i_ManagementInterface_i(), i_PartitionManager_i::~i_PartitionManager_i(), i_ResourceManager_i::~i_ResourceManager_i(), i_Service_i::~i_Service_i(), and i_UIMessageServer_i::~i_UIMessageServer_i().

00508                          {
00509     log_FUNC_m(Shutdown);
00510 
00511     if (ipc_Corba::IsInShutdown()) {
00512         log_DBG_m(dbg_LOW, "** Shutdown already in progress. Ignore.");
00513         return;
00514     };
00515 
00516     ipc_Corba::Singleton().m_inShutdown = true;
00517 
00518     if (!CORBA::is_nil(ipc_Corba::Singleton().m_orb)) {
00519         log_DBG_m(dbg_EXTAPI,
00520             "About to call m_orb->shutdown(0). Won't wait for invocations to finish.");
00521 
00522         ipc_EXEC_m( ipc_Corba::Singleton().m_orb->shutdown( 0 ); );
00523     }
00524 
00525 }

Here is the call graph for this function:

Here is the caller graph for this function:

ipc_Corba & ipc_Corba::Singleton (  )  [static, inherited]

void ipc_Corba::StopSignalHandler (  )  [private, inherited]

Definition at line 142 of file ipc_corba.cpp.

References ivd_STOP_THREAD, log_FUNC_m, and SignalHandler().

Referenced by ipc_Corba::Destroy().

00142                                   {
00143     log_FUNC_m(StopSignalHandler);
00144 
00145 #if TGT_OS_windows
00146     CtrlHandler(ivd_STOP_THREAD);
00147 #else
00148     SignalHandler(ivd_STOP_THREAD);
00149 #endif
00150 }

Here is the call graph for this function:

Here is the caller graph for this function:

ipc_Corba::~ipc_Corba (  )  [private, virtual, inherited]

Definition at line 132 of file ipc_corba.cpp.

References log_ERR_m, log_FUNC_m, ipc_Corba::m_destroyed, and ipc_Corba::Singleton().

00132                       {
00133     log_FUNC_m(~ipc_Corba);
00134     if (!ipc_Corba::Singleton().m_destroyed) {
00135         log_ERR_m("ORB didn't shut-down properly!");
00136     }
00137 }

Here is the call graph for this function:


Variable Documentation

unsigned long long i_JobParams::bufId [inherited]

string i_JobParams::diskBufferFS [inherited]

long i_JobParams::jobPriority [inherited]

const CORBA::ULong ipc_Corba::m_dbgDetail [static, inherited]

Definition at line 148 of file ipc.h.

Referenced by ipc_DbgOn().

const CORBA::ULong ipc_Corba::m_dbgLow [static, inherited]

Definition at line 146 of file ipc.h.

Referenced by ipc_DbgOn().

const CORBA::ULong ipc_Corba::m_dbgNorm [static, inherited]

Definition at line 147 of file ipc.h.

Referenced by ipc_DbgOn().

const CORBA::ULong ipc_Corba::m_dbgVerbose [static, inherited]

Verbose level of debugging: up to 128 bytes of GIOP messages are displayed.

Definition at line 149 of file ipc.h.

Referenced by ipc_DbgOn().

const string ipc_Corba::m_nsIvdClt_c = string("clt") [static, protected, inherited]

const string ipc_Corba::m_nsIvdEvtMgr_c = string("fsevtmgr") [static, protected, inherited]

Definition at line 159 of file ipc.h.

Referenced by ipc_Corba::GetFSEvtMgr_NSEntry().

const string ipc_Corba::m_nsIvdFS_c = string("fs") [static, protected, inherited]

Definition at line 160 of file ipc.h.

Referenced by ipc_Corba::GetPMFSID_NSEntry(), and ipc_Corba::GetPMFSName_NSEntry().

const string ipc_Corba::m_nsIvdLib_c = string("lib") [static, protected, inherited]

Definition at line 154 of file ipc.h.

Referenced by ipc_Corba::GetLA_NSEntry().

const string ipc_Corba::m_nsIvdMgr_c = string("mgr") [static, protected, inherited]

Definition at line 155 of file ipc.h.

Referenced by ipc_Corba::GetMIF_NSEntry(), and ipc_Corba::GetPMID_NSEntry().

const string ipc_Corba::m_nsIvdMIF_c = string("mif") [static, protected, inherited]

Definition at line 156 of file ipc.h.

Referenced by ipc_Corba::GetMIF_NSEntry().

const string ipc_Corba::m_nsIvdPart_c = string("part") [static, protected, inherited]

Definition at line 157 of file ipc.h.

Referenced by ipc_Corba::GetPMID_NSEntry().

const string ipc_Corba::m_nsIvdPrefix_c = g_cmn.prod.m_nameShort [static, protected, inherited]

const string ipc_Corba::m_nsIvdRM_c = string("rm") [static, protected, inherited]

Definition at line 153 of file ipc.h.

Referenced by ipc_Corba::GetRM_NSEntry().

const string ipc_Corba::m_nsIvdSvc_c = string("svc") [static, protected, inherited]

Definition at line 161 of file ipc.h.

Referenced by ipc_Corba::GetSvc_NSEntry().

string i_JobParams::partName [inherited]

class _OMNIORB_NTDLL_IMPORT POA_i_Component

Definition at line 30 of file i_component_impl.h.

const char s_orbName[] = "omniORB4" [static]

Definition at line 93 of file ipc_corba.cpp.

Referenced by ipc_Corba::Init().


Generated on Mon Feb 27 18:56:09 2012 for OPENARCHIVE by  doxygen 1.5.6