/** * Execute the EclipseLink dynamically batched/concatenated statement. */ protected void executeBatchedStatement(PreparedStatement statement, AbstractSession session) throws DatabaseException { try { executeDirectNoSelect(statement, null, session); } catch (RuntimeException exception) { try {// Ensure that the statement is closed, but still ensure that the real exception is thrown. closeStatement(statement, session, null); } catch (SQLException closeException) { } throw exception; } // This is in a separate try block to ensure that the real exception is not masked by the close exception. try { closeStatement(statement, session, null); } catch (SQLException exception) { //With an external connection pool the connection may be null after this call, if it is we will //be unable to determine if it is a connection based exception so treat it as if it wasn't. DatabaseException commException = processExceptionForCommError(session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, this, session, false); } }
/** * Execute the EclipseLink dynamically batched/concatenated statement. */ protected void executeBatchedStatement(PreparedStatement statement, AbstractSession session) throws DatabaseException { try { executeDirectNoSelect(statement, null, session); } catch (RuntimeException exception) { try {// Ensure that the statement is closed, but still ensure that the real exception is thrown. closeStatement(statement, session, null); } catch (SQLException closeException) { } throw exception; } // This is in a separate try block to ensure that the real exception is not masked by the close exception. try { closeStatement(statement, session, null); } catch (SQLException exception) { //With an external connection pool the connection may be null after this call, if it is we will //be unable to determine if it is a connection based exception so treat it as if it wasn't. DatabaseException commException = processExceptionForCommError(session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, this, session, false); } }
/** * Execute the EclipseLink dynamically batched/concatenated statement. */ protected void executeBatchedStatement(PreparedStatement statement, AbstractSession session) throws DatabaseException { try { executeDirectNoSelect(statement, null, session); } catch (RuntimeException exception) { try {// Ensure that the statement is closed, but still ensure that the real exception is thrown. closeStatement(statement, session, null); } catch (SQLException closeException) { } throw exception; } // This is in a separate try block to ensure that the real exception is not masked by the close exception. try { closeStatement(statement, session, null); } catch (SQLException exception) { //With an external connection pool the connection may be null after this call, if it is we will //be unable to determine if it is a connection based exception so treat it as if it wasn't. DatabaseException commException = processExceptionForCommError(session, exception, null); if (commException != null) throw commException; throw DatabaseException.sqlException(exception, this, session, false); } }
/** * Execute the statement. */ protected Integer executeNoSelect(DatabaseCall call, Statement statement, AbstractSession session) throws DatabaseException { Integer rowCount = executeDirectNoSelect(statement, call, session); // Allow for procs with outputs to be raised as events for error handling. if (call.shouldBuildOutputRow()) { AbstractRecord outputRow = buildOutputRow((CallableStatement)statement, call, session); call.getQuery().setProperty("output", outputRow); if (session.hasEventManager()) { session.getEventManager().outputParametersDetected(outputRow, call); } } return rowCount; }
/** * Execute the statement. */ protected Integer executeNoSelect(DatabaseCall call, Statement statement, AbstractSession session) throws DatabaseException { Integer rowCount = executeDirectNoSelect(statement, call, session); // Allow for procs with outputs to be raised as events for error handling. if (call.shouldBuildOutputRow()) { AbstractRecord outputRow = buildOutputRow((CallableStatement)statement, call, session); call.getQuery().setProperty("output", outputRow); if (session.hasEventManager()) { session.getEventManager().outputParametersDetected(outputRow, call); } } return rowCount; }
/** * Execute the statement. */ protected Integer executeNoSelect(DatabaseCall call, Statement statement, AbstractSession session) throws DatabaseException { Integer rowCount = executeDirectNoSelect(statement, call, session); // Allow for procs with outputs to be raised as events for error handling. if (call.shouldBuildOutputRow()) { AbstractRecord outputRow = buildOutputRow((CallableStatement)statement, call, session); call.getQuery().setProperty("output", outputRow); if (session.hasEventManager()) { session.getEventManager().outputParametersDetected(outputRow, call); } } return rowCount; }
resultSet = (ResultSet)((CallableStatement)statement).getObject(dbCall.getCursorOutIndex()); } else { accessor.executeDirectNoSelect(statement, dbCall, session); result = accessor.buildOutputRow((CallableStatement)statement, dbCall, session);
ResultSet resultSet = null; if (!dbCall.getReturnsResultSet()) { accessor.executeDirectNoSelect(statement, dbCall, session); result = accessor.buildOutputRow((CallableStatement)statement, dbCall, session);
resultSet = (ResultSet)((CallableStatement)statement).getObject(dbCall.getCursorOutIndex()); } else { accessor.executeDirectNoSelect(statement, dbCall, session);
ResultSet resultSet = null; if (!dbCall.getReturnsResultSet()) { accessor.executeDirectNoSelect(statement, dbCall, session); result = accessor.buildOutputRow((CallableStatement)statement, dbCall, session);
resultSet = (ResultSet)((CallableStatement)statement).getObject(dbCall.getCursorOutIndex()); } else { accessor.executeDirectNoSelect(statement, dbCall, session);