public void CallRemotService() { IBankA service = (IBankA) Activator.GetObject(typeof(IBankA), "tcp://localhost:2133/BankA"); Assert.IsTrue(RemotingServices.IsTransparentProxy(service)); Assert.IsTrue(RemotingServices.IsObjectOutOfAppDomain(service)); service.GetBankAccount("test"); }
public void TearDown() { container.Release(myBankA); container.Release(myBankB); myBankA=null; myBankB=null; Configuration cfg = (Configuration) container[ "nhibernate.factory.cfg" ]; SchemaExport export = new SchemaExport(cfg); export.Drop(false, true); DisposeContainer(); }
public void SetUp() { SetContainer(); Configuration cfg = (Configuration) container[ "nhibernate.factory.cfg" ]; SchemaExport export = new SchemaExport(cfg); export.Create(false, true); // It is not possible to add the transaction component here! See http://forum.castleproject.org/posts/list/455.page // container.AddFacility( "transactions", new TransactionFacility() ); myBankA = (IBankA) container["BankA"]; myBankB = (IBankB) container["BankB"]; }
public void TearDown() { container.Release(myBankA); container.Release(myBankB); myBankA = null; myBankB = null; Configuration cfg = (Configuration)container["nhibernate.factory.cfg"]; SchemaExport export = new SchemaExport(cfg); export.Drop(false, true); DisposeContainer(); }
public void SetUp() { SetContainer(); Configuration cfg = (Configuration)container["nhibernate.factory.cfg"]; SchemaExport export = new SchemaExport(cfg); export.Create(false, true); // It is not possible to add the transaction component here! See http://forum.castleproject.org/posts/list/455.page // container.AddFacility( "transactions", new TransactionFacility() ); myBankA = (IBankA)container["BankA"]; myBankB = (IBankB)container["BankB"]; }
public void TestTransactionCreationEComp() { ISessionManager sessionManager = (ISessionManager) container[typeof(ISessionManager)]; using (ISession session = sessionManager.OpenSession()) { Assert.IsNull(session.Transaction); IBankA myBankA = (IBankA)container["BankA"]; myBankA.TestTransactionCreation(); Assert.IsTrue(session.Transaction.WasCommitted); } }