Exemplo n.º 1
0
 public virtual void Release(ShutdownMode mode, Transaction transaction, bool rollbackOnClose
                             )
 {
     lock (_mainContainer.Lock())
     {
         ClientTransactionPool.ContainerCount entry = (ClientTransactionPool.ContainerCount
                                                       )_transaction2Container.Get(transaction);
         entry.Container().CloseTransaction(transaction, false, mode.IsFatal() ? false : rollbackOnClose
                                            );
         _transaction2Container.Remove(transaction);
         entry.Release();
         if (entry.IsEmpty())
         {
             _fileName2Container.Remove(entry.FileName());
             try
             {
                 entry.Close(mode);
             }
             catch (Exception t)
             {
                 // If we are in fatal ShutdownMode close will
                 // throw but we want to continue shutting down
                 // all entries.
                 Sharpen.Runtime.PrintStackTrace(t);
             }
         }
     }
 }
		public virtual void Release(ShutdownMode mode, Transaction transaction, bool rollbackOnClose
			)
		{
			lock (_mainContainer.Lock())
			{
				ClientTransactionPool.ContainerCount entry = (ClientTransactionPool.ContainerCount
					)_transaction2Container.Get(transaction);
				entry.Container().CloseTransaction(transaction, false, mode.IsFatal() ? false : rollbackOnClose
					);
				_transaction2Container.Remove(transaction);
				entry.Release();
				if (entry.IsEmpty())
				{
					_fileName2Container.Remove(entry.FileName());
					try
					{
						entry.Close(mode);
					}
					catch (Exception t)
					{
						// If we are in fatal ShutdownMode close will
						// throw but we want to continue shutting down
						// all entries.
						Sharpen.Runtime.PrintStackTrace(t);
					}
				}
			}
		}
Exemplo n.º 3
0
 public virtual void Close(ShutdownMode mode)
 {
     if (!mode.IsFatal())
     {
         _container.Close();
         _container = null;
         return;
     }
     _container.FatalShutdown(((ShutdownMode.FatalMode)mode).Exc());
 }
 public bool Close(ShutdownMode mode)
 {
     lock (_lock)
     {
         if (!IsMessageDispatcherAlive())
         {
             return(true);
         }
         _isClosed = true;
     }
     lock (_mainLock)
     {
         _transactionHandle.ReleaseTransaction(mode);
         if (!mode.IsFatal())
         {
             SendCloseMessage();
         }
         _transactionHandle.Close(mode);
         CloseSocket();
         RemoveFromServer();
         return(true);
     }
 }
		public bool Close(ShutdownMode mode)
		{
			lock (_lock)
			{
				if (!IsMessageDispatcherAlive())
				{
					return true;
				}
				_isClosed = true;
			}
			lock (_mainLock)
			{
				_transactionHandle.ReleaseTransaction(mode);
				if (!mode.IsFatal())
				{
					SendCloseMessage();
				}
				_transactionHandle.Close(mode);
				CloseSocket();
				RemoveFromServer();
				return true;
			}
		}
			public virtual void Close(ShutdownMode mode)
			{
				if (!mode.IsFatal())
				{
					_container.Close();
					_container = null;
					return;
				}
				_container.FatalShutdown(((ShutdownMode.FatalMode)mode).Exc());
			}