Search code examples
javacorba

How to pass an object from Corba Client to Corba Server


Using Java as a programming language , i have this question regards how to send an object from Corba client to Corba server noting that i am using POA and the following idl file :-

// BackupServer.idl

#ifndef BackupServer_idl
#define BackupServer_idl

interface BackupDaemon;
#include "BackupExceptions.idl"
typedef sequence<BackupDaemon> BackupDaemonList;

interface BackupDaemon {
   attribute string backupDaemonUser;
   attribute string backupDaemonIP;
   attribute string backupDaemonHostName;
   attribute string backupDaemonBackupType;
   attribute string backupDaemonType;
   attribute string backupDaemonTime;
   attribute string backupDaemonPath;
   attribute boolean backupDaemonScheduled;
   attribute long backupDaemonPort;
   attribute string backupDaemonMacAddress;
   typedef sequence<string> BackupPathesStrings;
   boolean startBackup(
      in BackupPathesStrings backupPathes,
      in string backupDaemonMacAddress );
   void deleteBackup(
      in string backupPathes,
      in string backupDaemonMacAddress ) raises (BackupPathNotFoundException);
};

interface BackupServer {
   boolean registerBackupDaemon( in BackupDaemon bd )
      raises (InvalidBackupDaemonException);
   boolean unRegisterBackupDaemon(in string backupDaemonMacAddress)
      raises (InvalidBackupDaemonException);
   BackupDaemonList getBackupDeamons();
};

Thanks in advance


Solution

  • The only "true" object sent on the wire with CORBA is ValueType otherwise "references" may be exchanged and more simple structured raw data as "struct" and "union".

    Migrate a CORBA server from one location to another isn't trivial and not directly feasible but may be achieved with a complex deployment.