Package com.avaje.ebean

Examples of com.avaje.ebean.EbeanServer.endTransaction()


    Product shadow2 = server.find(Product.class, prod2.getId());
   
    Assert.assertNull(shadow1);
    Assert.assertNull(shadow2);
   
    server.endTransaction();
   
  }
 
  private Product createProduct(Integer id, String name) {
    Product prod = new Product();
View Full Code Here


      EBasic loadedEntity = server.find(EBasic.class,bean1.getId());

      assertThat(loadedEntity.getName(), is("hello-changed"));

    } finally {
      server.endTransaction();
    }
   
  }
 
}
View Full Code Here

    server.beginTransaction();
    try {
        EMain b3 = server.find(EMain.class, b.getId());
        Assert.assertEquals("ABC", b3.getEmbeddable().getDescription());
    } finally {
        server.endTransaction();
    }
    EMain b4 = server.find(EMain.class, b.getId());
    b4.setName("bbb");
    b4.getEmbeddable().setDescription("123");
    server.save(b4);
View Full Code Here

    try {
      ebean = EbeanContext.server();
    } catch(IllegalStateException e) {
      Logger.error(e, "EbeanPlugin ending transaction in finally");
    }
    if (ebean != null) ebean.endTransaction();
    EbeanContext.set(null);
  }

  @Override
  public void enhance(ApplicationClass applicationClass) throws Exception
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.