OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: .NET Serviced Components, Oracle and overall Design question

From: Nick Robinson (nicholasrobinsonYAHOO.CO.UK)
Date: Thu Jan 15 2004 - 05:37:09 CST


I am not sure what you mean.

 --- "Katiyar, Subodh (Path)" <skatiyarAFSINDIA.COM> wrote: > Hi,
>
> throw some exception in the phase II object that has called for
> rollback.
>
> Best Regards,
>
> -----Original Message-----
> From: Nick Robinson [mailto:nicholasrobinsonYAHOO.CO.UK]
> Sent: Thursday, January 15, 2004 3:19 Shaam
> To: DCOMDISCUSS.MICROSOFT.COM
> Subject: .NET Serviced Components, Oracle and overall Design question
>
>
> I am not sure this is the right place to post this, so please accept my apologies if I am wrong
> for writing here.
>
> I have created a single, .NET Serviced Component. The component requires a transaction, and has
> a
> single method, called Insert.
>
> [AutoComplete]
> public void Insert(Somedata)
> {
> DBRepository dbRepository = new DBRepository();
> dbRepository.Insert(Somedata);
> }
>
> DBRepository is a vanilla C# class created in a different assembly to the serviced component.
> The
> repository also uses a DAL type assembly which contains structures and classes for accessing
> stored procedures in an Oracle database. In the above example, the sequence diagram looks like:
>
> Assembly A Assembly B Assembly C
> Client ServicedComponent DBRepository StoredProc
>
> Insert(data)
> --------------------> <<create>>
> --------------------> <<create>>
> -------------------->
>
> Insert(data)
> --------------------->
> SetParams(...)
> ------------------->
>
> ExecuteNonQuery()
> ------------------->
> <--------------------
>
> In a test application, I managed to get the above working 100%. When exceptions occur during
> the
> method call to the serviced component, the transaction is rolled back, even though the
> repository
> and stored procedure classes are not .NET serviced components.
>
> After getting the test harness to work, I introduced the .NET Serviced Component design to a
> real
> system, which has a similar call chain to above. However in this scenario, I get the following
> error:
>
> "The root transaction wanted to commit, but transaction aborted".
>
> I am using Oracle 9.2.0.4 with the latest version of ODP.NET. This error occurs immediately
> after
> the method returns, so I dont think the error is due to a DTC timeout.
>
> Any advice on this would be most welcome.
>
> Thanks in advance.
>
>
>
> =====
> nick.robinson
> site : www.fromconcept.co.uk
> blog : www.fromconcept.co.uk/weblog.aspx
>
> ________________________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
>
> ----------------------------------------------------------------
> Users Guide http://discuss.microsoft.com/archives/mailfaq.html
> contains important info. Save time, search the archives at
> http://discuss.microsoft.com/archives/index.html .
> To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM
>
>
> DISCLAIMER:
> The information contained in this Message is confidential and intended only for the use of the
> individual or entity identified. If the reader of this message is not the intended recipient,
> any dissemination, distribution or copying of the information contained in this message is
> strictly prohibited. If you received this message in error, please notify the sender
> immediately.
>
> ----------------------------------------------------------------
> Users Guide http://discuss.microsoft.com/archives/mailfaq.html
> contains important info. Save time, search the archives at
> http://discuss.microsoft.com/archives/index.html .
> To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM

=====
nick.robinson
site : www.fromconcept.co.uk
blog : www.fromconcept.co.uk/weblog.aspx

________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

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