Package org.jugile.util

Examples of org.jugile.util.DBConnection.execute()


      List<List> res = c.select();
      nid = (Integer)res.get(0).get(0);
      c.prepare("update idpool set nextid=? where obj=?");
      c.param(nid+idIncrement);
      c.param(obj);
      c.execute();
      c.commit();
    } catch (Exception e) {
      try { c.rollback(); } catch (Exception e2) { } fail(e);
    } finally {
      try { c.free(); } catch (Exception e) { log.fatal("could not free connection",e); }     
View Full Code Here


      c.prepare(sql);
      c.param(INPROGRESS);
      c.param(node);
      c.param(NEW);
      for (Long id : ids) { c.param(id); }
      int count = c.execute();
      if (count != ids.size()) fail("inconsistent status write: " + count + "/"+ ids.size());
      c.commit();
      log.debug("read messages from :" + node + " size: " + count);
      return msgs;
    } catch (java.sql.SQLNonTransientConnectionException se) {
View Full Code Here

    DBConnection c = pool.getConnection();
    try {
      String sql = "delete from dbmq_queue_t where nodeid=?";
      c.prepare(sql);
      c.param(name);
      int res = c.execute();
      c.commit();
      return res;
    } catch (java.sql.SQLNonTransientConnectionException se) {
      fail("connection error in flush: " + name);
    } catch (Exception e) {
View Full Code Here

    DBConnection c = pool.getConnection();
    try {
      String sql = "delete from dbmq_queue_t where nodeid=? and status!=0";
      c.prepare(sql);
      c.param(name);
      int res = c.execute();
      c.commit();
      return res;
    } catch (java.sql.SQLNonTransientConnectionException se) {
      fail("connection error in flush: " + name);
    } catch (Exception e) {
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.