[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-dcom
Subject:    Re: ADO Connection and Poolable objects.
From:       Steve Swartz <stevesw () MICROSOFT ! COM>
Date:       2000-11-28 6:23:39
[Download RAW message or body]


The point is, pooled objects cannot live in the STA. They're created
in a thread other than any STA thread. If they have thread affinity
(which all STA objects have), they cannot be moved from thread to thread
as new requests come in. So, by definition and implementation, you cannot
pool an STA object.

-----Original Message-----
From: Robert Szasz [mailto:Robert.Szasz@EPF.COM]
Sent: Monday, November 27, 2000 17:16
To: DCOM@DISCUSS.MICROSOFT.COM
Subject: Re: ADO Connection and Poolable objects.


What about creating objects when there are none in the pool. If the poolable
object is not marked as 'Both' the new object instance will be created in
the MTA and force proxy/stub communication unless of course the caller is in
the MTA aswell.

R O B !

-----Original Message-----
From: Steve Swartz [mailto:stevesw@MICROSOFT.COM]
Sent: Monday, November 27, 2000 6:33 PM
To: DCOM@DISCUSS.MICROSOFT.COM
Subject: Re: ADO Connection and Poolable objects.


This is a point that is repeatedly misunderstood.

Poolable objects do not run in the Neutral Apartment. Poolable objects must
run in the MTA. You should mark them "Free", not "Both" (since it will not
work to start them in a STA). If you use them from an MTA component, you
will not get a proxy/stub between the caller and callee.

This confusion results from misleading documentation which says that pooled
objects must be neutral with respect to the thread they run on. What this
means is, they cannot be thread-bound (like STA or VB6 objects). They have
to be thread-agnostic (like MTA objects).

-----Original Message-----
From: George Ter-Saakov [mailto:gt-saakov@CARDONE.COM]
Subject: ADO Connection and Poolable objects.

I would like to keep database connections open in poolable objects as it
suggested in article
http://msdn.microsoft.com/msdnmag/issues/1200/comtips/comtips.asp (
paragraph 10 ).

So I am going to mark ADO objects as having threading model "Both" (Thanks
Hitesh Mittal ).

Since poolable objects resides in TNA I believe that I will have proxy/stub
layer between my object and ADO. Am I correct?

I am afraid that proxy/stub will swallow all performance gain I am going to
achieve comparing to the normal ADO connection pooling.

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

_____________________________________________________________________
This message has been checked for all known viruses by UUNET delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/

****************************************************************************
*
This e-mail message and any files transmitted with it are confidential and
for the use of the addressee only. If you have received this communication
in error, please notify us immediately by replying to it, and then delete it
from your computer
****************************************************************************
*
This message has been checked for all known viruses by UUNET delivered
through the MessageLabs Virus Control Centre.
____________________________________________________________________________
_

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic