Guys,
I have a very simple question for you. In the following code scenario
while(true)
{
Transaction tran = new Transaction (System.Data.IsolationLevel.ReadCommitted, "PickManager - CreateOrder");
try
{
.....
tran.commit();
}
catch(Exception ex)
{
tran.Rollback();
}
finally
{
trans.Dispose();
}
Thread.Sleep(1000);
}
Is it more efficient to create a new transaction object on every thread iteration (like shown here) or to create the transaction before the start of the loop and re-use it?
- LLBLGen Version 2.6
- .NET 3.5
- Oracle 10g
- ODP.NET 10g 2.102.2.20.
Thanks.