NHibernate ソース @ https://github.com/nhibernate
Isession @ NHibernate.Impl.SessionImpl のセッション実装から
public ITransaction BeginTransaction()
{
using (new SessionIdLoggingContext(SessionId))
{
if (rootSession != null)
{
// Todo : should seriously consider not allowing a txn to begin from a child session
// can always route the request to the root session...
log.Warn("Transaction started on non-root session");
}
CheckAndUpdateSessionStatus();
return connectionManager.BeginTransaction();
}
}
public ITransaction Transaction
{
get { return connectionManager.Transaction; }
}
NHibernate.Adonet.ConnectionManager クラスから
public ITransaction BeginTransaction()
{
Transaction.Begin();
return transaction;
}
public ITransaction Transaction
{
get
{
if (transaction == null)
{
transaction = session.Factory.TransactionFactory.CreateTransaction(session);
}
return transaction;
}
}