Package java.sql

Examples of java.sql.DatabaseMetaData.supportsTransactionIsolationLevel()


/*    */
/*    */   public void setIsolationLevel(Connection conn, int level) throws SQLException, NotImplementedException
/*    */   {
/* 96 */     DatabaseMetaData metaData = conn.getMetaData();
/*    */
/* 98 */     if (metaData.supportsTransactionIsolationLevel(level))
/*    */     {
/*    */       try
/*    */       {
/* 102 */         if (conn.getTransactionIsolation() != level)
/*    */         {
View Full Code Here


          Connection.TRANSACTION_SERIALIZABLE };

      DatabaseMetaData dbmd = this.conn.getMetaData();

      for (int i = 0; i < isolationLevels.length; i++) {
        if (dbmd.supportsTransactionIsolationLevel(isolationLevels[i])) {
          this.conn.setTransactionIsolation(isolationLevels[i]);

          assertTrue(
              "Transaction isolation level that was set ("
                  + isoLevelNames[i]
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.