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: Robert Hurlbut (rhurlbutHURLBUT-CONSULTING.COM)
Date: Sat Jan 17 2004 - 10:39:51 CST


Nick,

I have been dealing with this same issue the last few weeks (and have
documented it on my blog). See my solution that I finally arrived at this
week:

 <http://weblogs.asp.net/rhurlbut/archive/2004/01/14/58770.aspx>
http://weblogs.asp.net/rhurlbut/archive/2004/01/14/58770.aspx

Let me know if this helps in your situation.

Regards,

Robert Hurlbut

-----Original Message-----

From: Nick Robinson [ <mailto:nicholasrobinsonYAHOO.CO.UK>
mailto:nicholasrobinsonYAHOO.CO.UK]

Sent: Thursday, January 15, 2004 2:58 PM

Subject: Re: .NET Serviced Components, Oracle and overall Design question

OK I think I see your point. The .NET Serviced Component in this case, is
the first point of call, and any invokation on any method on the class being
used by the client (and the client is irrelevant), will start the logical
transaction. I say the client is irrelevant because I know the client isnt
some other component that could also be in a transaction when it calls into
my component. Likewise, my component in that scenario wouldnt be the root
transaction.

When you say component, it is interesting. In my scenario, I only have one
component but two other classes from two different assemblies, none of these
two classes are ServicedComponent descendants. Since the classes will be
invoked in-proc, and bound as in a normal method invokation on a canonical
class, the two classes will automatically become part of the Context, and
thus be part of the logical transaction. If these were components, I would
need to mark them as supporting a transaction. However in the design I
mentioned, there is only one transaction, assigned to the
application/controller layer.

The problem has been solved however. It seems using the latest version of
Oracle and ODP.NET with the Oracle MTS services, Proxy Authentication is not
supported. In my situation, this is the security design we have been forced
to comply with. Apparently the OracleMTS COM+ services fails to access the
relevant security details, when using Proxy Authentication, requiring a
persons password to be exposed on the connection string, which obviates the
need for PA in the first place. So, when the method call returns and
everything *is* ok, the Oracles MTS/COM+ services fail to work correctly,
and everything bombs out as we get the error "The root transaction wanted to
commit, but transaction aborted".

Incidentally, in the situation were this problem arose, the client was a
simple test case running under NUnit.

nick.robinson

site : <outbind://40/www.fromconcept.co.uk> www.fromconcept.co.uk

blog : <outbind://40/www.fromconcept.co.uk/weblog.aspx>
www.fromconcept.co.uk/weblog.aspx

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