private static INpgsqlResourceManager CreateResourceManager()
 {
     // TODO: create network proxy for resource manager
     if (_resourceManager == null)
     {
         _sponser = new System.Runtime.Remoting.Lifetime.ClientSponsor();
         AppDomain rmDomain = AppDomain.CreateDomain("NpgsqlResourceManager", AppDomain.CurrentDomain.Evidence, AppDomain.CurrentDomain.SetupInformation);
         _resourceManager =
             (INpgsqlResourceManager)
             rmDomain.CreateInstanceAndUnwrap(typeof (NpgsqlResourceManager).Assembly.FullName,
                                              typeof (NpgsqlResourceManager).FullName);
         _sponser.Register((MarshalByRefObject)_resourceManager);
     }
     return _resourceManager;
     //return new NpgsqlResourceManager();
 }
 private static ITransactionResourceManager GetResourceManager()
 {
     if (_resourceManager == null)
     {
         _sponser = new System.Runtime.Remoting.Lifetime.ClientSponsor();
         AppDomain rmDomain = AppDomain.CreateDomain("Neo4jTransactionResourceManager", AppDomain.CurrentDomain.Evidence, AppDomain.CurrentDomain.SetupInformation);
         _resourceManager = (ITransactionResourceManager) rmDomain.CreateInstanceAndUnwrap(
             typeof(Neo4jTransactionResourceManager).Assembly.FullName,
             typeof(Neo4jTransactionResourceManager).FullName);
         _sponser.Register((MarshalByRefObject)_resourceManager);
     }
     return _resourceManager;
 }