Objects with No State
  • Coding an object with no member variables requires that every method retrieve the state and store it in local variables.
  • Some sort of reference to the state is required.
    • Could add a specific parameter to the IDL.
    • Could use the abilities of the POA to locate our object ID
        CORBA::Object_var mySelf = _this();
        PortableServer::ObjectID_var id;
        id = _poa->reference_to_id( mySelf );
        
      • the POA uses thread local storage to do this.
  • Once we have the state handle use storage operations to get state.
    • Might seem expensive but...
      • Prevents long-term caching of state
      • All long-term caching is the database's responsibility

Next Slide >>