protected final long expectedCompletionTime;
protected final long unprocessedFailoverThreshold;
private static final String LOGGER_ALARM_MSG="Generated alarm: DBResourceManager.getData - No active DB connection pools are available.";
+ private static final String EXCEPTION_MSG= "No active DB connection pools are available in RequestDataNoRecovery call.";
public DBResourceManager(final DBLIBResourceProvider configuration) {
this(configuration.getProperties());
private CachedRowSet requestDataNoRecovery(String statement, ArrayList<Object> arguments, String preferredDS) throws SQLException {
if(dsQueue.isEmpty()){
LOGGER.error(LOGGER_ALARM_MSG);
- throw new DBLibException("No active DB connection pools are available in RequestDataNoRecovery call.");
+ throw new DBLibException(EXCEPTION_MSG);
}
CachedDataSource active = this.dsQueue.first();
long time = System.currentTimeMillis();
}
}
return active.getData(statement, arguments);
-// } catch(SQLDataException exc){
-// throw exc;
+
} catch(Throwable exc){
String message = exc.getMessage();
if(message == null)
private boolean writeDataNoRecovery(String statement, ArrayList<Object> arguments, String preferredDS) throws SQLException {
if(dsQueue.isEmpty()){
LOGGER.error(LOGGER_ALARM_MSG);
- throw new DBLibException("No active DB connection pools are available in RequestDataNoRecovery call.");
+ throw new DBLibException(EXCEPTION_MSG);
}
boolean initialRequest = true;
SQLException exception = new DBLibException(lastException.getMessage());
exception.setStackTrace(lastException.getStackTrace());
if(lastException.getCause() instanceof SQLException) {
-// exception.setNextException((SQLException)lastException.getCause());
+
throw (SQLException)lastException.getCause();
}
throw exception;