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: CPP20012 and C20014 are misleading.



Target: CPPCNI CD04 Rev4 and CCNI CD04 Rev4

Description: CPP20012 and C20014 both state: An SCA runtime MUST ensure that a stateless scoped implementation instance object is only ever dispatched on one thread at any one time. In addition, within the SCA lifecycle of an instance, an SCA runtime MUST only make a single invocation of one business function.

If an implementation truly is stateless - i.e. does not use static variables and only uses data members (C++) global variables (C, a stateless C++ implementation should never access a global variable for holding property values - than this statement is unnecessary.

The question becomes what kind of protection can a runtime provide for in implementation identified as stateless that is not truly so.  Static and global variables exist as long as the library containing them  resides in memory and it is not possible to guarantee that a library can be unloaded after an arbitrary function invocation.  The second sentence of the normative statements implies a level of protection that is simply not possible to provide. And newing/freeing an object after every member function invocation is a performance hit.

The first sentence does not have any problematic implications, but I think is meaningless in C.to the extent that a function invocation only exists on one thread.

Proposal: At a minimum, the second sentence of CPP20012 and C20014 should be deleted.  We should discuss if any other changes are appropriate.

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]