-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major
-
None
-
Affects Version/s: Version 1.1
-
Component/s: C Specification
-
None
Originally CCPP-43
TARGET: C++ C&I Spec
DESCRIPTION: Section 2.3.4 of the C spec discusses the possibility of passivating a service implementation instance in a long-running conversation, however it doesn't define how implementation state should be preserved.
PROPOSAL: This is a initial view of a possible set of APIs to provide this functionality.
A component that needs to have state maintained requests the space it needs from the SCA runtime SCAStateAlloc() and can access the persistent state with SCAGetState(). SCAStateAlloc() returns a block of memory that will associated with the requesting component instance for the rest of the instance's lifecycle. The component uses this memory for all relevant state data. If a component instance might be passivated, it is considered best practice to call SCAGetState() to endure a valid pointer before accessing any persistent data. If a component is implemented as a program, SCAGetState() can be called on any invocation of an operation of a service of the component as needed.
void SCAStateAlloc(int bytesNeeded,
void **stateBuffer
int *compCode,
int *reason);
void SCAGetState(void **stateBuffer
int *compCode,
int *reason);
Raised to the OASIS Service Component Architecture / C and C++ (SCA-C-C++) TC in the e-mail at http://lists.oasis-open.org/archives/sca-c-cpp/200808/msg00012.html