Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COM+ , use of SetComplete
Message
From
09/11/2004 15:45:34
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
COM+ , use of SetComplete
Environment versions
Visual FoxPro:
VFP 8 SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959728
Message ID:
00959728
Views:
40
Question regarding use of SetComplete() in the context of COM+ server components.

Craig's example from an article:
	DEFINE CLASS Math AS SESSION OLEPUBLIC
	  FUNCTION Multiply(tnNum1, tnNum2)
	    LOCAL lnResult, loMtx, loContext

	    * Create a reference to the MTS object
	    loMtx = CREATEOBJECT(“MTXAS.APPSERVER.1”)

	    * Create a reference to the Context object
	    loContext = loMtx.GetObjectContext()
	    lnResult = tnNum1 * tnNum2

	    * Commit the transaction if there is one
            * and tell MTS that we’re done using the component
	    loContext.SetComplete()
	    RETURN lnResult
	  ENDFUNC
	ENDDEFINE
My reading tells me that the call to SetComplete() tells the component the client is finished with it, and it may end up cleared from server memory.

I have a server-based component designed to perform some app-specific searches, which is called from the client form. If I want to have the same client use the component for multiple calls to these search methods over a long data entry session, should SetComplete() be used at the conclusion of these methods like that?
Jim Newsom
IT Director, ICG Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform