Package org.springframework.jdbc

Examples of org.springframework.jdbc.UncategorizedSQLException


          if (createStatement) {
            try {
              con.createStatement();
            }
            catch (SQLException ex) {
              throw new UncategorizedSQLException("", "", ex);
            }
          }
          throw ex;
        }
      });
View Full Code Here


          assertEquals(con, new SimpleNativeJdbcExtractor().getNativeConnection(dsProxy.getConnection()));
          // should be ignored
          dsProxy.getConnection().close();
        }
        catch (SQLException ex) {
          throw new UncategorizedSQLException("", "", ex);
        }
      }
    });

    assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds));
View Full Code Here

          assertEquals(con, new SimpleNativeJdbcExtractor().getNativeConnection(dsProxy.getConnection()));
          // should be ignored
          dsProxy.getConnection().close();
        }
        catch (SQLException ex) {
          throw new UncategorizedSQLException("", "", ex);
        }

        tt.execute(new TransactionCallbackWithoutResult() {
          @Override
          protected void doInTransactionWithoutResult(TransactionStatus status) {
            // something transactional
            assertEquals(con, DataSourceUtils.getConnection(ds));
            try {
              assertEquals(con, ((ConnectionProxy) dsProxy.getConnection()).getTargetConnection());
              assertEquals(con, new SimpleNativeJdbcExtractor().getNativeConnection(dsProxy.getConnection()));
              // should be ignored
              dsProxy.getConnection().close();
            }
            catch (SQLException ex) {
              throw new UncategorizedSQLException("", "", ex);
            }
          }
        });

        try {
          assertEquals(con, ((ConnectionProxy) dsProxy.getConnection()).getTargetConnection());
          // should be ignored
          dsProxy.getConnection().close();
        }
        catch (SQLException ex) {
          throw new UncategorizedSQLException("", "", ex);
        }
      }
    });

    assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds));
View Full Code Here

          assertEquals(con, new SimpleNativeJdbcExtractor().getNativeConnection(dsProxy.getConnection()));
          // should be ignored
          dsProxy.getConnection().close();
        }
        catch (SQLException ex) {
          throw new UncategorizedSQLException("", "", ex);
        }

        tt.execute(new TransactionCallbackWithoutResult() {
          @Override
          protected void doInTransactionWithoutResult(TransactionStatus status) {
            // something transactional
            assertEquals(con, DataSourceUtils.getConnection(ds));
            try {
              assertEquals(con, ((ConnectionProxy) dsProxy.getConnection()).getTargetConnection());
              assertEquals(con, new SimpleNativeJdbcExtractor().getNativeConnection(dsProxy.getConnection()));
              // should be ignored
              dsProxy.getConnection().close();
            }
            catch (SQLException ex) {
              throw new UncategorizedSQLException("", "", ex);
            }
          }
        });

        try {
          assertEquals(con, ((ConnectionProxy) dsProxy.getConnection()).getTargetConnection());
          // should be ignored
          dsProxy.getConnection().close();
        }
        catch (SQLException ex) {
          throw new UncategorizedSQLException("", "", ex);
        }
      }
    });

    assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds));
View Full Code Here

        list.add(sql);
        try {
          return action.doInPreparedStatement(ps);
        }
        catch (SQLException e) {
          throw new UncategorizedSQLException("doInPreparedStatement", sql, e);
        }
      }
    };
    writer.setSql("SQL");
    writer.setJdbcTemplate(new NamedParameterJdbcTemplate(jdbcTemplate));
View Full Code Here

      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("committing count=" + count); //$NON-NLS-1$
      }
     
    } catch (SQLException ex) {
      throw new UncategorizedSQLException("Failed to batch discrete matrix elements.", "", ex);
    }
  }
View Full Code Here

      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("committing count=" + count); //$NON-NLS-1$
      }

    } catch (SQLException ex) {
      throw new UncategorizedSQLException(
        "Failed to prepare for batch matrix elements.",
        "",
        ex);
    }
View Full Code Here

      if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("committing count=" + count); //$NON-NLS-1$
      }

    } catch (SQLException ex) {
      throw new UncategorizedSQLException(
        "Failed to batch continuous matrix elements.",
        "",
        ex);
    }
  }
View Full Code Here

        LOGGER.debug("rowSymbolbatch committing count=" + count); //$NON-NLS-1$
      }
     

    } catch (SQLException ex) {
      throw new UncategorizedSQLException(
        "Failed to batch row symbols.",
        "",
        ex);
    }
View Full Code Here

        mDiscreteStateMapsByCol[i] = stateMap;
      }

    } catch (SQLException ex) {
      throw new UncategorizedSQLException(
        "Failed to prepare for batch matrix elements.",
        "",
        ex);
    }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.UncategorizedSQLException

Copyright © 2018 www.massapicom. 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.