Esempio n. 1
0
 public static void Initialize(IBurrowConfig configuration)
 {
     instance = new PersistenceUnitRepo();
     foreach (IPersistenceUnitCfg pus in configuration.PersistenceUnitCfgs)
     {
         instance.PersistenceUnits.Add(new PersistenceUnit(pus, configuration.Configurator));
     }
 }
        public void Start()
        {
            if (IsRunning)
            {
                throw new GeneralException("Burrow Environment is already running");
            }

            currentWorkSpaceHolder = new LocalSafe <WorkSpace>();
            PersistenceUnitRepo.Initialize(Configuration);
        }
 /// <summary>
 /// ShutDown the whole environment
 /// </summary>
 /// <remarks>
 /// it will roll back every conversation in the pool
 /// </remarks>
 public void ShutDown()
 {
     CheckRunning();
     if (new BurrowFramework().WorkSpaceIsReady)
     {
         throw new GeneralException(
                   "Domain must be closed before ShutDown, call BurrowFramework.CloseWorkSpace() first");
     }
     ConversationPool.Instance.Clear();
     currentWorkSpaceHolder = null;
     PersistenceUnitRepo.ResetInstance();
 }
		public static void ResetInstance() {
			instance = null;
		}
		public static void Initialize(IBurrowConfig configuration) {
			instance = new PersistenceUnitRepo();
			foreach (IPersistenceUnitCfg pus in configuration.PersistenceUnitCfgs)
				instance.PersistenceUnits.Add(new PersistenceUnit(pus, configuration.Configurator));
		}
Esempio n. 6
0
 public static void ResetInstance()
 {
     instance = null;
 }