OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Bardia Ghahremani (bghKABELFOON.NL)
Date: Mon Jun 18 2001 - 08:29:26 CDT

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

    Hi Allen,

    Looks to me you are creating a kind of singleton inside your component. see:
    Tip #2 of the online version of Effective COM
        http://msdn.microsoft.com/library/periodic/period98/ecom.htm

    The only thing to do in your case is synchronising access to the STL list:
    thus using synchronizing objects. Better not to use STA appartments in this
    case.

    Bardia

    -----Original Message-----
    From: Distributed COM-Based Code [mailto:DCOMDISCUSS.MICROSOFT.COM]On
    Behalf Of Allen Weng
    Sent: maandag 18 juni 2001 10:53
    To: DCOMDISCUSS.MICROSOFT.COM
    Subject: Holding a list within a transactional MTS component

    Hi All,

    I would like to know if anyone here know if there is any drawback of
    declaring and using a static STL list in a transactional component and
    securing access to this list. In this way, it should be valid while the
    DLL is loaded. Read/Write access will be done whenever a call is mode to
    the component. I need this STL list to keep a list of activity within
    the component. It will be a simple list that will hold some IDs of past
    activities we had during the current life of the component. The Shared
    Property Manager (SPM) is one solution in this case. But I do want to
    know what if I use STL list.

    Any suggestions is appreciated.

    - Allen

    ----------------------------------------------------------------
    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

    ----------------------------------------------------------------
    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