Examples of DbPool


Examples of org.jugile.util.DBPool

      c.execute();
    }     
  }

  public static List<Msg> getMessages(String node, int max) {
    DBPool pool = DBPool.getPool();
    DBConnection c = pool.getConnection();
    List<Msg> msgs = new ArrayList<Msg>();
    try {
      String sql ="";
      sql += "select msg_id, nodeid, status, ts from dbmq_queue_t ";
      sql += "where nodeid=? AND status=? ORDER BY ts LIMIT ?";
View Full Code Here

Examples of org.jugile.util.DBPool

    }
    return msgs;
  }
 
  public static int flush(String name) {
    DBPool pool = DBPool.getPool();
    DBConnection c = pool.getConnection();
    try {
      String sql = "delete from dbmq_queue_t where nodeid=?";
      c.prepare(sql);
      c.param(name);
      int res = c.execute();
View Full Code Here

Examples of org.jugile.util.DBPool

    }
    return 0;
  }

  public static int flushNotNew(String name) {
    DBPool pool = DBPool.getPool();
    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();
View Full Code Here

Examples of org.jugile.util.DBPool

import org.jugile.util.Time;

public class DBTest extends JugileTestCase {

  public static void clearDatabase() throws Exception {
    DBPool db = DBPool.getPool();
    DBConnection c = db.getConnection();
    c.updateN("delete from person_t");
    c.updateN("delete from family_t");
    c.updateN("delete from map_person_2friend_family");
    c.updateN("delete from dbmq_queue_t");
    c.updateN("delete from dbmq_messages_t");
View Full Code Here

Examples of org.xmlBlaster.contrib.db.DbPool

    * Creates a database pooling instance and puts it to info.
    * @param info The configuration
    * @return The created pool
    */
   private DbPool setUpDbPool(I_Info info) {
      DbPool dbPool = new DbPool();
      dbPool.init(info);
      info.putObject("db.pool", dbPool);
      return dbPool;
   }
View Full Code Here

Examples of org.xmlBlaster.contrib.db.DbPool

    * Creates a database pooling instance and puts it to info.
    * @param info The configuration
    * @return The created pool
    */
   private DbPool setUpDbPool(I_Info info) {
      DbPool dbPool = new DbPool();
      dbPool.init(info);
      info.putObject("db.pool", dbPool);
      return dbPool;
   }
View Full Code Here

Examples of org.xmlBlaster.contrib.db.DbPool

      addIfNotSet("db.url", dbUrl);
      addIfNotSet("db.user", dbUser);
      addIfNotSet("db.password", dbPassword);
      addIfNotSet("db.drivers", dbDrivers);
     
      I_DbPool newPool = new DbPool();
     
      newPool.init(this);
      this.persistentInfo = new DbInfo(newPool, "replication", this);
      return newPool;
   }
View Full Code Here

Examples of org.xmlBlaster.contrib.db.DbPool

         // connectionPoolSize
         QueuePluginManager pluginManager = new QueuePluginManager(glob);
         PluginInfo pluginInfo = new PluginInfo(glob, pluginManager, "JDBC", "1.0");
         info = new TestInfo();
         ((TestInfo)info).init(glob, pluginInfo);
         pool = new DbPool();
         pool.init(info);
        
         // delete tables
         String prefix = "queue.jdbc";
         storeFactory = new XBStoreFactory(prefix);
View Full Code Here

Examples of org.xmlBlaster.contrib.db.DbPool

      info.put("jdbc.drivers", driverClass);
      info.put("db.url", dbUrl);
      info.put("db.user", dbUser);
      info.put("db.password", dbPassword);
       
      DbPool dbPool = new DbPool();
      dbPool.init(info);
      info.putObject("db.pool", dbPool);
     
      return dbPool;
   }
View Full Code Here

Examples of org.xmlBlaster.contrib.db.DbPool

    * @see TestCase#setUp()
    */
   protected void setUp() throws Exception {
      super.setUp();
      I_Info info = new PropertiesInfo(System.getProperties());
      this.pool = new DbPool();
      this.pool.init(info);
      String context = null; // shall be set to '/'
      info.put("dbs.table", "TEST_DB_STORAGE");
      this.dbStorage = new DbStorage(info, this.pool, context);
     
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.