Package org.xmlBlaster.contrib.db

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


         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

         }
         SpecificOracle oracle = new SpecificOracle();
         I_Info info = new PropertiesInfo(System.getProperties());
         oracle.init(info);
         I_DbPool pool = (I_DbPool) info.getObject("db.pool");
         Connection conn = pool.reserve();
         String objectTypes = info.get("objectTypes", null);
         String schema = info.get("schema", "AIS");
         String referencedSchema = info.get("referencedSchema", null);
         oracle.cleanupSchema(schema, objectTypes, referencedSchema);
         conn = SpecificDefault.releaseIntoPool(conn, COMMIT_NO, pool);
View Full Code Here

      I_DbPool pool = (I_DbPool) info.getObject("db.pool");
      Connection conn = null;
      try {
         SqlInfo sqlInfo = new SqlInfo(info);
         SqlDescription description = new SqlDescription(info);
         conn = pool.reserve();
         conn.setAutoCommit(true);
         ArrayList list = new ArrayList();
         TableToWatchInfo.getSortedTablesToWatch(conn, info, list);
         for (int i=0; i < list.size(); i++) {
            SqlDescription descr = (SqlDescription)list.get(i);
View Full Code Here

            pool = DbWatcher.getDbPool(this.info);
            // OracleByEventsScheduler.registerEvent(pool, this.event);
            while (!this.forceShutdown) {
               Connection conn = null;
               try {
                  conn = pool.reserve();
                  conn.setAutoCommit(true);
                  if (log.isLoggable(Level.FINE))
                     log.fine("Checking now Database again. pollInterval=" + this.pollIntervall + " ...");
                  try {
                     OracleByEventsScheduler.registerEvent(conn, this.event);
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

               pusher.join();
               ps = null;

               this.interceptor.waitOnUpdate(1000*this.sleepDelay, 1);

               conn = pool.reserve();
               Statement st = conn.createStatement();
               ResultSet rs = null;
               try {
                  rs = st.executeQuery("SELECT * from " + this.tableName2);
                  rs.next();
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

      log.info("Start testMultithreading");
      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 {
               this.interceptor.clear();
               sql = "CREATE TABLE " + this.tableName + " (name VARCHAR(20), age INTEGER, PRIMARY KEY(name))";
               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

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.