Package org.prevayler.examples.common

Examples of org.prevayler.examples.common.Member


  Prevayler<Club> prevayler = initPrevayler();


  @Test
  public void testInitiationProblem() throws Exception {
    Member member = createMember("John");

    prevayler.execute(new NameChange(member, "John S"));
    assertEquals("John S", member.name());

    prevayler.execute(new NameChangeWithProblem(member, "John Smith"));
    assertEquals("John S", member.name()); //The name change did not work because transactions are serialized and deserialized by Prevayler, producing a deep clone. The person object in the transaction is no longer the object we passed in but a clone!

    prevayler.close();
  }
View Full Code Here

TOP

Related Classes of org.prevayler.examples.common.Member

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.