Examples of Reserve()


Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

      log.info("Start testDifferentFormats");
      I_DbPool pool = (I_DbPool)info.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
         String sql = null;
         sql = "CREATE TABLE " + this.tableName + " (first DATE, PRIMARY KEY(first))";
         pool.update(sql);
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

      log.info("Start testDifferentFormats");
      I_DbPool pool = (I_DbPool)info.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
         String sql = null;
         String type = "TIMESTAMP";
         // TODO remove this after testing
         type = "DATE";
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

         log.info("An Exception here is allowed");
      }
     
      pool.update("CREATE TABLE PERFORM (name1 VARCHAR(20), name2 VARCHAR(128), name3 BLOB, primary key (name1))");

      Connection conn = pool.reserve();
      conn.setAutoCommit(false);
      String sql = "INSERT INTO PERFORM VALUES (?, ?, ?)";
      byte[] blob = new byte[1024];
      for (int i=0; i < blob.length; i++)
         blob[i] = (byte)i;
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

      I_DbPool pool = (I_DbPool)info.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
     
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
         String sql = null;
         { // test the test methods themselves first
             sql = "{? = call " + this.replPrefix + "test_blob(?,?,?,?)}";
             try {
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

      I_DbPool pool = (I_DbPool)info.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
     
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
         String sql = null;
         {
          // col2xml_cdata(?, ?)
            sql = "{? = call " + this.replPrefix + "test_clob(?,?,?,?)}"; // name text, content text)
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

      log.info("Start testChangesToReplTables");
      I_DbPool pool = (I_DbPool)info.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
         String schema = this.specificHelper.getOwnSchema(pool);
         changesToReplTables(conn, null, schema, "test_lowecase", true);
         changesToReplTables(conn, "", schema, "test_lowecase", true);
         changesToReplTables(conn, null, schema, "test_lowecase", false);
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

      I_DbPool pool = (I_DbPool)info.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
     
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
//         String sql = null;
      }
      catch (Exception ex) {
         ex.printStackTrace();
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

                  dbSpecific = ReplicationConverter.getDbSpecific(readerInfo, forceCreationAndInitNo); // done only on master !!!
                  readerInfo.put(I_DbSpecific.NEEDS_PUBLISHER_KEY, "" + needsPublisher); // back to original
                  I_DbPool pool = (I_DbPool)readerInfo.getObject("db.pool");
                  if (pool == null)
                     throw new Exception("ReplicationAgent.init: the db pool is null");
                  Connection conn = pool.reserve();
                  try {
                     boolean doWarn = false;
                     boolean force = false;
                     dbSpecific.bootstrap(conn, doWarn, force);
                  }
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

               line.equalsIgnoreCase("stop") ||
               line.equalsIgnoreCase("finish"))
            break;

         try {
            conn  = pool.reserve();
            Statement st = conn.createStatement();
            boolean ret = st.execute(line);
            if (ret) {
               ResultSet rs = st.getResultSet();
               while (rs.next()) {
View Full Code Here

Examples of org.xmlBlaster.contrib.db.I_DbPool.reserve()

         I_Info info = new PropertiesInfo(System.getProperties());
         boolean forceCreationAndInit = true;
         I_DbSpecific specific = ReplicationConverter.getDbSpecific(info, forceCreationAndInit);
         pool = (I_DbPool) info.getObject("db.pool");
         conn = pool.reserve();
         conn.setAutoCommit(true);
         String schema = info.get("wipeout.schema", null);
         String version = info.get("replication.version", "0.0");
         if (schema == null) {
            String initialUpdateFile = info.get("initialUpdate.file", null);
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.