Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
What's really happening with MTDLL data sessions???
Can somebody please explain this behavior to me:
- I have defined an OLEPUBLIC VFP class derived from CUSTOM, which I've compiled into an MTDLL
- I create a COM object from that class within ASP
- Within a method of the object, a DBF is opened (this would be in the default datasession since the class is derived from CUSTOM rather than SESSION, no?)
- The object is destroyed when the ASP page finishes
This all works fine. But what I don't understand is this: When another object is created from the same class (let's say I load the ASP page again), I would expect the table to still be USED, but it's not. All tables that were opened during the life of the object are apparently closed when the object is destroyed.
This is _not_ what I expected. I thought that the default datasession was scoped to the the DLL, rather than only being scoped to the life of the object. I thought that once a table was USED, it stayed open until it was explicitly closed by code or by unloading the MTDLL (restarting IIS, in this case).
Could somebody please explain what's really going on? I need more understanding of which data structures are "global" and persistent within an MTDLL vs which data structures are scoped to an object created from a (class within a) MTDLL as the object goes through its life cycle.
Thank you!!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement