Issue 5639: A new exception specification is needed for CCM2Context::req_passivate() (components-ftf) Source: THALES (Mr. Hakim Souami, hakim.souami(at)thalesgroup.com) Nature: Uncategorized Issue Severity: Summary: Document ptc/2001-11-03, CORBA Component Model ---------------------------------------------- 62.4.1.1 The CCM2Context Interface .... local interface CCM2Context : CCMContext { HomeRegistration get_home_registration (); void req_passivate () raises (PolicyMismatch); CatalogBase get_persistence (in _TypeId catalog_type_id) raises (PersistenceNotAvailable); }; .... req_passivate The req_passivate operation is used by the component to inform the container that it wishes to be passivated when its current operation completes. To be valid, the component must have a servant lifetime policy of component or container. If not, the PolicyMismatch exception shall be raised. ---------------------------------------------- What happens if req_passivate() operation is not called in the scope of a callback operation? I think that req_passivate() can only make sense if called in the context of a callback operation. The IllegalState exception is appropriate for this case. The IDL might then look like this : void req_passivate () raises (IllegalState,PolicyMismatch); and the following sentence might be appended to the paragraph above: "If this operation is issued outside of the scope of a callback operation, the IllegalState exception is returned." This addition will ease implementation of CCM2Context objects based on POACurrent : implementing container and component servant lifetime policies on a POA with RETAIN servant retention policy and the other servant lifetime policies on a POA with NON_RETAIN servant retention policy can rely entirely on the POACurrent. Resolution: Revised Text: Actions taken: September 6, 2002: received issue Discussion: End of Annotations:===== From: hakim.souami@fr.thalesgroup.com To: issues@omg.org, components-rtf@omg.org Subject: A new exception specification is needed for CCM2Context::req_pass ivate() Date: Fri, 6 Sep 2002 10:30:41 +0200 X-Mailer: Internet Mail Service (5.5.2653.19) Hi, Document ptc/2001-11-03, CORBA Component Model ---------------------------------------------- 62.4.1.1 The CCM2Context Interface .... local interface CCM2Context : CCMContext { HomeRegistration get_home_registration (); void req_passivate () raises (PolicyMismatch); CatalogBase get_persistence (in _TypeId catalog_type_id) raises (PersistenceNotAvailable); }; .... req_passivate The req_passivate operation is used by the component to inform the container that it wishes to be passivated when its current operation completes. To be valid, the component must have a servant lifetime policy of component or container. If not, the PolicyMismatch exception shall be raised. ---------------------------------------------- What happens if req_passivate() operation is not called in the scope of a callback operation? I think that req_passivate() can only make sense if called in the context of a callback operation. The IllegalState exception is appropriate for this case. The IDL might then look like this : void req_passivate () raises (IllegalState,PolicyMismatch); and the following sentence might be appended to the paragraph above: "If this operation is issued outside of the scope of a callback operation, the IllegalState exception is returned." This addition will ease implementation of CCM2Context objects based on POACurrent : implementing container and component servant lifetime policies on a POA with RETAIN servant retention policy and the other servant lifetime policies on a POA with NON_RETAIN servant retention policy can rely entirely on the POACurrent. Hakim -- Hakim SOUAMI T H A L E S COMMUNICATION 1-5, Avenue Carnot - 91883 MASSY Cedex - France Tel : 33 (0)1 69 75 35 17 Fax : 33 (0)1 69 75 31 79 _____________________________________________________