Package org.xmlBlaster.contrib.db

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


      log.info("Start testPerformAllOperationsOnTable");
      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;
         {
            try {
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(20), age INTEGER, PRIMARY KEY(name))";
View Full Code Here


      log.info("Start testTableWithLongs");
      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;
         {
            try {
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(20), comments LONG, PRIMARY KEY(name))";
View Full Code Here

      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

      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

         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

      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

      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

      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

      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

                  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

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.