[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [sca-c-cpp] NEW ISSUE: Preserving State of C components.
Bryan Aupperle/Raleigh/IBM@IBMUS
08/19/2008 02:43 PM |
|
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]