How to port a SMARTSOFT/CORBA component to SMARTSOFT/ACE

SMARTSOFT/CORBA provides a repository with a list of ready to run components. These components are available for download on Sourceforge. Though the components are implemented for SMARTSOFT/CORBA it is only a little workaround necessary to port these components to SMARTSOFT/ACE implementation. The appropriate components-repository is currently under development.

From the component builder view the interfaces of CORBA and ACE implementations of SMARTSOFT are mainly equal with exactly two differences, which will be shown in the following.

  1. Modify the framework interface part in Communication Objects (namely the get and set methods).
    • Change get(...) method as follows:
      • From: void get(CORBA::Any &) const;
      • To: void get(ACE_Message_Block *&msg) const;
    • Change set(...) method as follows:
      • From: void set(const CORBA::Any &);
      • To: void set(const ACE_Message_Block *msg);
  2. Replace the exception catcher in the main routine as follows:
      catch  (const CORBA::Exception &)
        std::cerr << "Uncaught CORBA exception" << std::endl;
        return 1;
      catch (std::exception &e)
        std::cerr << e.what() << std::endl;
        return 1;
    • From:
    • To:

Obviously no modifications on user code are necessary (neither inside of components nor in communication object's user interface). Of course some libraries (used in user-code) could be not portable from Linux to Windows. The replacement of the exception catcher is a simple copy and paste procedure. The reimplementation of the framework interface of Communication Objects is unavoidable. The reason is that communication objects encapsulate the main part of the underlying communication framework. In this case the communication is changed from Remote Procedure Calls (RPCs) on CORBA to message-based communication on ACE (for more information on how to implement communication objects for SMARTSOFT/ACE read the communication-object-howto).