OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Kjell Arild Tangen (kjell.tangen_at_COMPUTAS.COM)
Date: Thu Jan 16 2003 - 02:24:28 CST

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

    COM+ uses automatic transactions controlled by DTC, and the application has no direct control over transaction lifetime. The only thing you can do when running in the context of such a transaction is to vote whether the transaction should commit or abort. You have no control over exactly when (or if, in the case of a commit) the commit or abort happens. However, by partitioning your components carefully, you can probably do what you want: If component A, supporting transactions, calls component B, configured as "requiring new transaction", the call to B will happen in the scope of a new transaction in any case. If, on the other hand, component B is configured as "requires transaction", a new transaction will be created only if the calling component runs outside of a transaction. If called by a component already running inside a transaction, B will run in the context of this transaction.

    Alternatively, you may use local (database) transactions, which you can fully control.

    Regards,
    Kjell Tangen

    > -----Original Message-----
    > From: Jonas Blunck TACMa [mailto:jobuTAC.SE]
    > Sent: 15. januar 2003 15:35
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: Re: COM+: Creating a transaction programatically
    >
    >
    > Yes, you can create the transaction explicitly whenever you
    > need one. But,
    > COM+ doesn't create the transaction inside the database until you
    > COM+ actually
    > access the database. Then you can explicitly tell COM+ to
    > commit/rollback the transaction whenever you want to. You
    > have a pretty good control of the transaction when running
    > inside COM+.
    >
    > The main reason for you to create your own transactions would
    > probably be to avoid the DTC, i.e performance overhead if you
    > only access one resource manager in the transaction.
    >
    > Cheers,
    > Jonas
    >
    >
    >
    >
    > -----Original Message-----
    > From: Shai Segev [mailto:shai_segev_HOTMAIL.COM]
    > Sent: den 15 januari 2003 15:30
    > To: DCOMDISCUSS.MICROSOFT.COM
    > Subject: COM+: Creating a transaction programatically
    >
    >
    > According to MSDN you can set a COM object under COM+ to
    > require a transaction. This cause a transaction to be created
    > when the object is called. The question is, can one write an
    > object that support transactions, but create the transaction
    > explictly when needed?
    >
    > Thanks,
    > Shai Segev
    >
    >
    > _________________________________________________________________
    > Protect your PC - get McAfee.com VirusScan Online
    > http://clinic.mcafee.com/clinic/ibuy/campai> gn.asp?cid=3963
    >
    >
    >
    > ----------------------------------------------------------------
    > Users Guide http://discuss.microsoft.com/archives/mailfaq.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://discuss.microsoft.com/archives/mailfaq.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://discuss.microsoft.com/archives/mailfaq.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