Package com.avaje.ebean

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


    @Transactional
    public void doSomething(EBasicVer v) {
       
        EbeanServer server = Ebean.getServer(null);
       
        inMethodTransaction = server.currentTransaction();
       
        Transaction t = server.createTransaction();
        SqlUpdate u = server.createSqlUpdate("update e_basicver set last_update = last_update+1 where id = ?");
        u.setParameter(1, v.getId());
        int count = server.execute(u, t);
View Full Code Here


  @Override
  public void afterInvocation()
  {
    EbeanServer ebean = EbeanContext.server();
    if (ebean != null && ebean.currentTransaction() != null) ebean.commitTransaction();
  }

  @Override
  public void invocationFinally()
  {
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.