OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-c-cpp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: NEW ISSUE: Preserving State of C components.



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);

Bryan Aupperle, Ph.D.
STSM, WebSphere Enterprise Platform Software Solution Architect


Research Triangle Park,  NC
+1 919-254-7508 (T/L 444-7508)
Internet Address: aupperle@us.ibm.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]