Issue 5909: Session2Context interface (components-ftf) Source: Computational Physics, Inc. (Mr. J. Scott Evans, evans(at)cpi.com) Nature: Uncategorized Issue Severity: 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. Resolution: Revised Text: Actions taken: April 22, 2003: received issue Discussion: End of Annotations:===== X-Sender: evans@mail.cpi.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 22 Apr 2003 18:57:38 -0400 To: issues@omg.org From: "J. Scott Evans" Subject: Component RTF Issue Issue: 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. From: mathieu.vadet@fr.thalesgroup.com To: juergen@omg.org, components-rtf@omg.org Subject: RE: issue 5909 -- Cmponents RTF issue Date: Fri, 25 Apr 2003 09:22:50 +0200 X-Mailer: Internet Mail Service (5.5.2653.19) Hi, actually, this is not true, as we have in formal/02-06-05 // inherited by Session2Context local interface SessionContext { // returns the reference of the called operation interface Object get_CCM_object() raises (IllegalState); }; then, a component implementation can do // in pseudo java code (inside a business operation) Object obj = getContext().get_CCM_object(); byte[] oid = getContext().get_oid_from_ref(obj); // and he obtained the desired object id this is exactly the same idea for Entity2Context nevertheless I agree, that it could be a good idea to directly have access to the object id (for session components) or to the component id (for entity components), but this is not mandatory With respect to these two interfaces (Session2Context and Entity2Context), another issue which needs to be clearly stated is how, when, and by who are they used ? regards, Mathieu > > > This is issue # 5909 "J. Scott Evans" > > > > Session2Context interface > > 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. > > ================================= > J|rgen Boldt > Director, Member Services > > Object Management Group > 250 First Avenue, Suite 100 > Needham, MA 02494 > > Tel. +1 781 444 0404 ext. 132 > Fax: +1 781 444 0320 > email: juergen@omg.org > www www.omg.org > > ================================ > ------------------------------------------------------------------------ ---------------- Mathieu Vadet - PhD Student, GOAL Team, LIFL CIFRE at THALES Communications, SC2 Department Address: THALES Communications 1-5, Avenue Carnot / BC4 91883 Massy Cedex, France Tel: (33) (0)1 69 75 35 37 E-Mail: mailto:mathieu.vadet@fr.thalesgroup.com See also: http://www.objectweb.org/openccm/ ------------------------------------------------------------------------ ----------------