Archived

This forum has been archived. Please start a new discussion on GitHub.

Does ICE have Smart Proxy?

Is there in ICE the CORBA smart proxy equivalent?

Somethig like this?
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/Smart_Proxies.html

They can be usefull to implement layer like cache, or other things similar.

Comments

  • marc
    marc Florida
    Please see this post regarding our support policy here on these forums.
  • I've updated my signature

    I've updated my signature
  • bernard
    bernard Jupiter, FL
    Hi Maurizio,

    There is no smart proxy in Ice: we don't provide a way to customize the generated proxy classes and register them with the Ice runtime.

    Naturally, you could define your own proxy-wrapper class, and in your code use this proxy wrapper instead of Ice proxies directly. Another possibility, if you don't mind changing your Slice definitions, is to wrap the proxy in a class object. E.g. say you have:
    interface Person
    {
       // various operations
    };
    interface Registry
    {
       Person* find(string name);
    };
    

    You could change it to be:
    class Person
    {
         // various operations
        Person* proxy; // proxy to the remote Person
    };
    interface Registry
    {
        Person find(string name);
    };
    
    and the returned Person object behaves like a smart proxy.

    Cheers,
    Bernard