Package org.apache.derby.iapi.sql

Examples of org.apache.derby.iapi.sql.Activation


   * @param activation the activation
   */
  private SQLSessionContext getCurrentSQLSessionContext(Activation activation) {
    SQLSessionContext curr;

    Activation parent = activation.getParentActivation();

    if (parent == null ) {
      // top level
      curr = getTopLevelSQLSessionContext();
    } else {
      // inside a nested connection (stored procedure/function), or when
      // executing a substatement the SQL session context is maintained
      // in the activation of the parent
      curr = parent.getSQLSessionContextForChildren();
    }

    return curr;
  }
View Full Code Here


    // try to remember the SQL statement in case anybody asks for it
    SQLText = sql;   

    try {
      Activation activation;
      try {
        PreparedStatement preparedStatement = lcc.prepareInternalStatement
            (lcc.getDefaultSchema(), sql, resultSetConcurrency==
                        java.sql.ResultSet.CONCUR_READ_ONLY, false);
        activation =
          preparedStatement.getActivation(lcc, resultSetType ==
                        java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE);
        checkRequiresCallableStatement(activation);
       } catch (Throwable t) {
        throw handleException(t);
       }


      // this is for a Statement execution
      activation.setSingleExecution();

      //bug 4838 - save the auto-generated key information in activation. keeping this
      //information in lcc will not work work it can be tampered by a nested trasaction
      if (autoGeneratedKeys == Statement.RETURN_GENERATED_KEYS)
        activation.setAutoGeneratedKeysResultsetInfo(columnIndexes, columnNames);
      return executeStatement(activation, executeQuery, executeUpdate);
    } finally {
        restoreContextStack();
    }
    }
View Full Code Here

   */
  public ResultSet getInsertResultSet(NoPutResultSet source, GeneratedMethod generationClauses,
                    GeneratedMethod checkGM)
    throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new InsertResultSet(source, generationClauses, checkGM, activation );
  }
View Full Code Here

  public ResultSet getInsertVTIResultSet(NoPutResultSet source,
                    NoPutResultSet vtiRS
                    )
    throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new InsertVTIResultSet(source, vtiRS, activation );
  }
View Full Code Here

    @exception StandardException thrown on error
   */
  public ResultSet getDeleteVTIResultSet(NoPutResultSet source)
    throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new DeleteVTIResultSet(source, activation);
  }
View Full Code Here

    @exception StandardException thrown on error
   */
  public ResultSet getDeleteResultSet(NoPutResultSet source)
      throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new DeleteResultSet(source, activation );
  }
View Full Code Here

                         int constantActionItem,
                         ResultSet[] dependentResultSets,
                         String resultSetId)
    throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new DeleteCascadeResultSet(source, activation,
                      constantActionItem,
                      dependentResultSets,
                      resultSetId);
View Full Code Here

   */
  public ResultSet getUpdateResultSet(NoPutResultSet source, GeneratedMethod generationClauses,
                    GeneratedMethod checkGM)
      throws StandardException
  {
    Activation activation = source.getActivation();
    //The stress test failed with null pointer exception in here once and then
    //it didn't happen again. It can be a jit problem because after this null
    //pointer exception, the cleanup code in UpdateResultSet got a null
    //pointer exception too which can't happen since the cleanup code checks
    //for null value before doing anything.
View Full Code Here

    @exception StandardException thrown on error
   */
  public ResultSet getUpdateVTIResultSet(NoPutResultSet source)
      throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new UpdateVTIResultSet(source, activation);
  }
View Full Code Here

                           GeneratedMethod checkGM,
                           int constantActionItem,
                           int rsdItem)
      throws StandardException
  {
    Activation activation = source.getActivation();
    getAuthorizer(activation).authorize(activation, Authorizer.SQL_WRITE_OP);
    return new UpdateResultSet(source, generationClauses, checkGM, activation,
                   constantActionItem, rsdItem);
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.Activation

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.