Package org.apache.derby.iapi.store.access

Examples of org.apache.derby.iapi.store.access.TransactionController


      @exception StandardException thrown if something goes wrong
     */
    public  void    releaseSavePoint( String savepointName, Object kindOfSavepoint throws StandardException
    {
        TransactionController tc = getTransactionExecute();
        if (tc != null)
        {
            currentSavepointLevel = tc.releaseSavePoint( savepointName, kindOfSavepoint );
            //after a release of a savepoint, we need to go through our temp tables list.
            if (allDeclaredGlobalTempTables != null)
                tempTablesReleaseSavepointLevels();
        }
    }
View Full Code Here


        @exception StandardException thrown if something goes wrong
      */
    public  void    languageSetSavePoint( String savepointName, Object kindOfSavepoint throws StandardException
    {
        TransactionController tc = getTransactionExecute();
        if (tc != null)
        {
            currentSavepointLevel = tc.setSavePoint( savepointName, kindOfSavepoint );
        }
    }
View Full Code Here

        /* Commit and set to new isolation level.
         * NOTE: We commit first in case there's some kind
         * of error, like can't commit within a server side jdbc call.
         */
        TransactionController tc = getTransactionExecute();
        if (!tc.isIdle())
        {
            // If this transaction is in progress, commit it.
            // However, do not allow commit to happen if this is a global
            // transaction.
            if (tc.isGlobal())
                throw StandardException.newException(SQLState.LANG_NO_SET_TRAN_ISO_IN_GLOBAL_CONNECTION);

            userCommit();
        }
        this.isolationLevel = isolationLevel;
View Full Code Here

        return (Activation)acts.get(acts.size() - 1);
    }

    public StringBuffer appendErrorInfo() {

        TransactionController tc = getTransactionExecute();
        if (tc == null)
            return null;

        StringBuffer sb = new StringBuffer(200);

        sb.append(LanguageConnectionContext.xidStr);
        sb.append(tc.getTransactionIdString());
        sb.append("), ");

        sb.append(LanguageConnectionContext.lccStr);
        sb.append(Integer.toString(getInstanceNumber()));
        sb.append("), ");
View Full Code Here

      // upgraded dictionary to at least level 10.4 (roles
      // introduced in 10.4):
      if (lcc.usesSqlAuthorization() &&
        dd.checkVersion(DataDictionary.DD_VERSION_DERBY_10_4, null)) {

        TransactionController tc = lcc.getTransactionExecute();

        String failedString =
          MessageService.getTextMessage(MessageId.AUTH_INVALID);

        if (dd.getRoleDefinitionDescriptor(username) != null) {
View Full Code Here

                new RAMTransactionContext(
                    cm,
                    AccessFactoryGlobals.RAMXACT_CONTEXT_ID,
                    rt, false /* abortAll */);

      TransactionController tc = rtc.getTransaction();

      if (xactProperties != null)
            {
        rawtran.setup(tc);
        tc.commit();
      }

            rawtran.setDefaultLockingPolicy(system_default_locking_policy);

      tc.commit();

      return tc;
        }
        return rtc.getTransaction();
    }
View Full Code Here

  }

  public LanguageConnectionContext setupConnection(ContextManager cm, String user, String drdaID, String dbname)
    throws StandardException {

    TransactionController tc = getConnectionTransaction(cm);

    cm.setLocaleFinder(this);
    pushDbContext(cm);

    // push a database shutdown context
View Full Code Here

  protected  UUID  makeDatabaseID(boolean create, Properties startParams)
    throws StandardException
  {
   
    TransactionController tc = af.getTransaction(
        ContextService.getFactory().getCurrentContextManager());

    String  upgradeID = null;
    UUID  databaseID;

    if ((databaseID = (UUID) tc.getProperty(DataDictionary.DATABASE_ID)) == null) {

      // no property defined in the Transaction set
      // this could be an upgrade, see if it's stored in the service set

      UUIDFactory  uuidFactory  = Monitor.getMonitor().getUUIDFactory();

     
      upgradeID = startParams.getProperty(DataDictionary.DATABASE_ID);
      if (upgradeID == null )
      {
        // just create one
        databaseID = uuidFactory.createUUID();
      } else {
        databaseID = uuidFactory.recreateUUID(upgradeID);
      }

      tc.setProperty(DataDictionary.DATABASE_ID, databaseID, true);
    }

    // Remove the database identifier from the service.properties
    // file only if we upgraded it to be stored in the transactional
    // property set.
    if (upgradeID != null)
      startParams.remove(DataDictionary.DATABASE_ID);

    tc.commit();
    tc.destroy();

    return databaseID;
  }
View Full Code Here

    {
      LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC();

      DataDictionary dd = lcc.getDataDictionary();

      TransactionController tc = lcc.getTransactionExecute();

      /*
      ** Inform the data dictionary we are going
      ** to perform some DDL
      */
 
View Full Code Here

     * on disk outside of service.properties.
     */
  protected Properties getAllDatabaseProperties()
    throws StandardException {

    TransactionController tc = af.getTransaction(
                    ContextService.getFactory().getCurrentContextManager());
    Properties dbProps = tc.getProperties();
    tc.commit();
    tc.destroy();

    return dbProps;
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.store.access.TransactionController

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.