Retaining State in COM+ objects?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Retaining State in COM+ objects?

  1. #1
    Stephen Guest

    Retaining State in COM+ objects?


    Hi,

    Does anyone know if it is possible to retain the state of an object
    that uses COM+ transactions?

    ie.

    obj.Property1 = "something"
    obj.DoTransaction

    where DoTransaction is defined as:

    Public sub DoTransaction()
    'get object context

    'do a few things
    'if any errors call SetAbort

    'call SetComplete if no errors
    End Sub

    its there anyway to keep the value of Property1 after calling
    DoTransaction?
    I've heard changing the isolation level of the component will make the
    component keep its state, but I can't seem to change it.

    Bringing up the component's properties, from the Component Services
    Console, under the "Transactions" tab, I only see the "Transaction
    Support" and "Transaction Timeout" settings. There are no options to
    change the isolation level.

    I'm running Win2k sp2, VS6 sp5, Sql 2000

    TIA


  2. #2
    NewCoder Guest

    Re: Retaining State in COM+ objects?

    Yes you can.


    "Stephen" <gndm_2001@yahoo.com> wrote in message news:3d5abcfb@10.1.10.29...
    >
    > Hi,
    >
    > Does anyone know if it is possible to retain the state of an object
    > that uses COM+ transactions?
    >
    > ie.
    >
    > obj.Property1 = "something"
    > obj.DoTransaction
    >
    > where DoTransaction is defined as:
    >
    > Public sub DoTransaction()
    > 'get object context
    >
    > 'do a few things
    > 'if any errors call SetAbort
    >
    > 'call SetComplete if no errors
    > End Sub
    >
    > its there anyway to keep the value of Property1 after calling
    > DoTransaction?
    > I've heard changing the isolation level of the component will make the
    > component keep its state, but I can't seem to change it.
    >
    > Bringing up the component's properties, from the Component Services
    > Console, under the "Transactions" tab, I only see the "Transaction
    > Support" and "Transaction Timeout" settings. There are no options to
    > change the isolation level.
    >
    > I'm running Win2k sp2, VS6 sp5, Sql 2000
    >
    > TIA
    >




  3. #3
    Paul Clement Guest

    Re: Retaining State in COM+ objects?

    On 14 Aug 2002 13:26:35 -0700, "Stephen" <gndm_2001@yahoo.com> wrote:


    Hi,

    Does anyone know if it is possible to retain the state of an object
    that uses COM+ transactions?

    ie.

    obj.Property1 = "something"
    obj.DoTransaction

    where DoTransaction is defined as:

    Public sub DoTransaction()
    'get object context

    'do a few things
    'if any errors call SetAbort

    'call SetComplete if no errors
    End Sub

    its there anyway to keep the value of Property1 after calling
    DoTransaction?
    I've heard changing the isolation level of the component will make the
    component keep its state, but I can't seem to change it.

    Bringing up the component's properties, from the Component Services
    Console, under the "Transactions" tab, I only see the "Transaction
    Support" and "Transaction Timeout" settings. There are no options to
    change the isolation level.

    I'm running Win2k sp2, VS6 sp5, Sql 2000

    You can use the Shared Property Manager to do this. The below example uses MTS but I believe the
    COM+ implementation uses the same objects.

    HOWTO: Use the Shared Property Manager in MTS Through VB Code
    http://support.microsoft.com/default...EN-US;Q191235&


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

  4. #4
    Stephen Guest

    Re: Retaining State in COM+ objects?


    Yup, COM+ seems to use the same objects.

    Thanks!

    >You can use the Shared Property Manager to do this. The below example uses

    MTS but I
    >believe the
    >COM+ implementation uses the same objects.
    >
    >HOWTO: Use the Shared Property Manager in MTS Through VB Code
    >http://support.microsoft.com/default...EN-US;Q191235&
    >
    >
    >Paul ~~~ pclement@ameritech.net
    >Microsoft MVP (Visual Basic)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center