-
Key: CORBA35-27
-
Legacy Issue Number: 5909
-
Status: open
-
Source: Computational Physics, Inc. ( J. Scott Evans)
-
Summary:
The Session2Context interface allows developers to create an object reference from an octet sequence (object id). The the Entity2Context allows developers to create an object reference from a ComponentId. Neither the Session2Context nor the the Entity2Context allows the developer to infer the octet sequence or ComponentId that is associated with an operation invocation on a component. In other words, a developer may use a context to create multiple references that are subsequently invoked by a client. When the client invokes an operation on the reference the component code will be required to satisfy the operation invocation (either through the monolithic or the locator language mapping strategy). There is no information, however, as to which of the created references is being invoked by a client. To resolve the ambiguity the component developer must be able to use the context to provide the current octet sequence or ComponentId corresponding to the reference that is currently being invoked.
Resolution:
Replace the following text in formal/02-06-05 on page 4-37
local interface Session2Context : SessionContext, CCM2Context
{ Object create_ref (in CORBA::RepositoryId repid); Object create_ref_from_oid ( in PortableServer::ObjectIdCORBA::OctetSeq oid, in CORBA::RepositoryId repid); PortableServer::ObjectId CORBA::OctetSeq get_oid_from_ref (in Object objref) raises (IllegalState, BadComponentReference); };
with
local interface Session2Context : SessionContext, CCM2Context
{ Object create_ref (in CORBA::RepositoryId repid); Object create_ref_from_oid ( in PortableServer::ObjectIdCORBA::OctetSeq oid, in CORBA::RepositoryId repid); PortableServer::ObjectId CORBA::OctetSeq get_oid_from_ref (in Object objref) raises (IllegalState, BadComponentReference); CORBA::OctetSeq get_current_oid () raises (IllegalState); };
and add the operation description
get_current_oid
The get_current_oid operation is used by the component to extract the oid
associated with the current operation invocation. This operation must be called
within an operation invocation. If not, the IllegalState exception shall be raised.Also, replace the following text in formal/02-06-05 on page 4-44
local interface Entity2Context : EntityContext, CCM2Context
{ ComponentId get_component_id () raises (IllegalState); ComponentId create_component_id ( in FacetId target_facet, in SegmentId target_segment, in SegmentDescrSeq seq_descrs); ComponentId create_monolithic_component_id ( in FacetId target_facet, in StateIdValue sid); Object create_ref_from_cid ( in CORBA::RepositoryId repid, in ComponentId cid); ComponentId get_cid_from_ref ( in Object objref) raises (BadComponentReference); };
with
local interface Entity2Context : EntityContext, CCM2Context
{ ComponentId get_component_id () raises (IllegalState); ComponentId create_component_id ( in FacetId target_facet, in SegmentId target_segment, in SegmentDescrSeq seq_descrs); ComponentId create_monolithic_component_id ( in FacetId target_facet, in StateIdValue sid); Object create_ref_from_cid ( in CORBA::RepositoryId repid, in ComponentId cid); ComponentId get_cid_from_ref ( in Object objref) raises (BadComponentReference); ComponentId get_current_cid () raises (IllegalState); };
and add the operation description
get_current_cid
The get_current_cid operation is used by a persistent component to retrieve the
ComponentId associated with the current operation invocation. This operation must be called
within an operation invocation. If not, the IllegalState exception shall be raised. -
Reported: CORBA 3.0.2 — Tue, 22 Apr 2003 04:00 GMT
-
Updated: Wed, 1 Feb 2023 21:59 GMT