OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Jeff Ferguson (jefffMAGENIC.COM)
Date: Tue May 01 2001 - 15:10:57 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    From a colleague:

    "I've been tasked with writing a component that needs to be pooled. This
    on it's face seemed pretty easy, but now after working with it for a
    while, find the documentation severily lacking, expecially relating to
    transactional pooled componenets.

    "I've implemented IObjectControl and think I've got that nailed down.
    According to the documentation, I need to enrole in the transaction
    manually and to disable auto enrollment. Unfortunately the only
    documentation I've found tells about turning off auto-enrollment for the
    machine, not the componenent. Does anyone know how to do this on a
    componenet basis? Or, better yet, have a code sample that works using
    ADO?"

    We've found an article at
    http://msdn.microsoft.com/library/techart/scalobjpool.htm#scalobjpool_manual
    that shows us how to manually enlist, but it doesn't illustrate how to
    disable automatic enlistment. My colleague continues:

    "What will happen is that the object will be created for the pool, either
    immediately before it's needed or on demand, when the connection is created,
    it will auto-enlist in a transaction and never remove itself until the
    object is destroyed, which in a pooled object isn't possible to determine.

    "But I did just find a way to create ADO connections without enlisting. You
    use a attribute on the connection string called "OLE DB Services" it has
    several values, one being -4 for "All services except pooling and
    auto-enlistment" which is what I want, since I have a connection and don't
    need pooling."

    Any ideas would be appreciated. Thanks.

    Jeff Ferguson, MCSD
    Senior Consultant
    Magenic Technologies
    corporate: http://www.magenic.com/
    personal: http://staff.magenic.com/jefff/default.asp

    ----------------------------------------------------------------
    Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM