Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM+ , use of SetComplete
Message
De
09/11/2004 15:45:34
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
COM+ , use of SetComplete
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00959728
Message ID:
00959728
Vues:
41
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform