public void Close()
{
lock(myLock)
{
if(this.closed)
{
return;
}
try
{
if(transactionContext.InNetTransaction)
{
this.transactionContext.AddSynchronization(new SessionCloseSynchronization(this));
}
else
{
Tracer.InfoFormat("Closing The Session with Id {0}", this.info.SessionId.ToString());
DoClose();
Tracer.InfoFormat("Closed The Session with Id {0}", this.info.SessionId.ToString());
}
}
catch(Exception ex)
{
Tracer.ErrorFormat("Error during session close: {0}", ex);
}
}
}