Package org.xmlBlaster.contrib.db

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


            try { // we explicitly choose a table without pk (to test searches)
               this.interceptor.clear();
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(30), data VARCHAR(4000))";
               pool.update(sql);
               this.interceptor.waitOnUpdate(this.sleepDelay, 1);
               conn = pool.reserve();
               conn.setAutoCommit(true);
               Statement st = conn.createStatement();
               ResultSet rs = null;
               try {
                  rs = st.executeQuery("SELECT * from " + this.tableName2);
View Full Code Here


         }

         {
            try {
               this.interceptor.clear();
               conn = pool.reserve();
               conn.setAutoCommit(true);
               sql = "INSERT INTO " + this.tableName + " (name, data) VALUES (?, ?)";
               PreparedStatement ps = conn.prepareStatement(sql);

               ps.setString(1, "someName");
View Full Code Here

              
               String inString = new String(blob);
               ps.setString(2, inString);
               ps.execute();
               this.interceptor.waitOnUpdate(1000*this.sleepDelay, 1);
               conn = pool.reserve();

               Statement st = conn.createStatement();
               ResultSet rs = null;
               String refString = null;
               try {
View Full Code Here

            try {
               this.interceptor.clear();
               sql = "DROP TABLE " + this.tableName;
               pool.update(sql);
               this.interceptor.waitOnUpdate(this.sleepDelay, 1);
               conn = pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = null;
               try {
                  rs = st.executeQuery("SELECT * from " + this.tableName2);
                  assertTrue("Testing '" + sql + "'. It must have resulted in an exception but did not.", false);
View Full Code Here

      interceptor.waitOnUpdate(sleepDelay, 1);
      I_DbPool pool = (I_DbPool)this.readerInfo.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
      try {
         conn  = pool.reserve();
         conn.setAutoCommit(true);
         String sql = null;
         try {
            boolean force = false;
            String destination = null;
View Full Code Here

            try { // we explicitly choose a table without pk (to test searches)
               this.interceptor.clear();
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(30), data BLOB)";
               pool.update(sql);
               this.interceptor.waitOnUpdate(this.sleepDelay, 1);
               conn = pool.reserve();
               conn.setAutoCommit(true);
               Statement st = conn.createStatement();
               ResultSet rs = null;
               try {
                  rs = st.executeQuery("SELECT * from " + this.tableName2);
View Full Code Here

      persistentInfo.put(name, "0");

      Connection conn = null;
      try {
         this.dbHelper = new DbMetaHelper(pool);
         conn = pool.reserve();
         boolean doWarn = false; // we don't want warnings on SQL Exceptions here.
         log.info("setUp: going to cleanup now ...");
         this.sleepDelay = this.readerInfo.getLong("test.sleepDelay", -1L);
         if (this.sleepDelay < 0L)
            this.sleepDelay = 25000L;
View Full Code Here

      interceptor.waitOnUpdate(sleepDelay, 1);
      I_DbPool pool = (I_DbPool)this.readerInfo.getObject("db.pool");
      assertNotNull("pool must be instantiated", pool);
      Connection conn = null;
      try {
         conn  = pool.reserve();
         try {
            pool.update("DROP TABLE " + this.tableName + this.specificHelper.getCascade());
         }
         catch (Exception ex) {
            conn = pool.reserve();
View Full Code Here

         conn  = pool.reserve();
         try {
            pool.update("DROP TABLE " + this.tableName + this.specificHelper.getCascade());
         }
         catch (Exception ex) {
            conn = pool.reserve();
         }
         try {
            pool.update("DROP TABLE " + this.tableName2 + this.specificHelper.getCascade()); // This is the replica
         }
         catch (Exception ex) {
View Full Code Here

         }
         try {
            pool.update("DROP TABLE " + this.tableName2 + this.specificHelper.getCascade()); // This is the replica
         }
         catch (Exception ex) {
            conn = pool.reserve();
         }

         // verifying
         try {
            ResultSet rs = conn.getMetaData().getTables(null, this.specificHelper.getOwnSchema(pool), this.dbHelper.getIdentifier(this.tableName), 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.