6.15.3.2 GetOutcome
The GetOutcome method retrieves the transaction outcome from the database server. The method will determine whether the transaction committed and completed or not.
Overload List:
-
GetOutcome(stringconstring,byte[]ltxid,out bool?bCommitted,out bool?bUserCallCompleted)The application can use this static method to determine the outcome if the outcome was not known when the exception was raised.
The application will need to obtain the connection string and
logical transaction idfrom theOracleException.OracleLogicalTransactionobject before calling this method.The supplied connection string will be used to establish a connection to the database to determine the outcome of the provided logical transaction id.
ODP.NET implicitly calls
GetOutcomeunder the following conditions:-
Transaction Guard is enabled on the service
-
OracleException is raised
-
The exception is a recoverable error
When all of the above is true, then the
OracleException.OracleLogicalTransactionproperty will be non-null.If a connection is involved in a distributed transaction, then
GetOutcomeis not called implicitly and theOracleException.OracleLogicalTransaction.LogicalTransactionIdproperty returns null. -
Note:
Once one server round-trip is incurred for the GetOutcome() invocation, the PL/SQL ForceOutcome is never invoked again against the server for a given OracleLogicalTransaction object.