Package org.apache.derby.iapi.services.context

Examples of org.apache.derby.iapi.services.context.ContextService


    /*
     * now we need to setup a context stack for the database creation work.
     * We assume the System boot process has created a context
     * manager already, but not that contexts we need are there.
     */
    ContextService csf = ContextService.getFactory();

    ContextManager cm = csf.getCurrentContextManager();
    if (SanityManager.DEBUG)
      SanityManager.ASSERT((cm != null), "Failed to get current ContextManager");

    // RESOLVE other non-StandardException errors.
    bootingTC = null;
View Full Code Here


    /*
     * now we need to setup a context stack for the database creation work.
     * We assume the System boot process has created a context
     * manager already, but not that contexts we need are there.
     */
    ContextService csf = ContextService.getFactory();

    ContextManager cm = csf.getCurrentContextManager();
    if (SanityManager.DEBUG)
      SanityManager.ASSERT((cm != null), "Failed to get current ContextManager");

    // RESOLVE other non-StandardException errors.
    bootingTC = null;
View Full Code Here

                    "debug flag (" + debug_strings[errs] +
                    ")did not cause exception.");
            }
            catch (StandardException e)
            {
                ContextService contextFactory = ContextService.getFactory();

                // Get the context manager.
                ContextManager cm = contextFactory.getCurrentContextManager();

                if (SanityManager.DEBUG)
                    SanityManager.ASSERT(cm != null);

                cm.cleanupOnError(e);
View Full Code Here

            catch (StandardException e)
            {
        if (!e.getMessageId().equals(SQLState.DEADLOCK))
          throw e;

                ContextService contextFactory =
                    ContextService.getFactory();

                // Get the context manager.
                ContextManager cm = contextFactory.getCurrentContextManager();

                if (SanityManager.DEBUG)
                    SanityManager.ASSERT(cm != null);

                cm.cleanupOnError(e);
View Full Code Here

    /*
     * now we need to setup a context stack for the database creation work.
     * We assume the System boot process has created a context
     * manager already, but not that contexts we need are there.
     */
    ContextService csf = ContextService.getFactory();

    ContextManager cm = csf.getCurrentContextManager();
    if (SanityManager.DEBUG)
      SanityManager.ASSERT((cm != null), "Failed to get current ContextManager");

    /* push a datadictionary context onto this stack */
    pushDataDictionaryContext(cm);
 
View Full Code Here

    /*
     * now we need to setup a context stack for the database creation work.
     * We assume the System boot process has created a context
     * manager already, but not that contexts we need are there.
     */
    ContextService csf = ContextService.getFactory();

    ContextManager cm = csf.getCurrentContextManager();
    if (SanityManager.DEBUG)
      SanityManager.ASSERT((cm != null), "Failed to get current ContextManager");

    // RESOLVE other non-StandardException errors.
    bootingTC = null;
View Full Code Here

      // RM also does not know about this xid.
      if (inDoubtCM == null)
        throw new XAException(XAException.XAER_NOTA);

      ContextService csf = ContextService.getFactory();

      csf.setCurrentContextManager(inDoubtCM);
      try
      {
        rm.commit(inDoubtCM, xid_im, onePhase);

        // close the connection/transaction since it can never be used again.
        inDoubtCM.cleanupOnError(StandardException.closeException());
        return;
      }
      catch (StandardException se)
      {
        // The rm threw an exception, clean it up in the approprate
        // context.  There is no transactionResource to handle the
        // exception for us.
        inDoubtCM.cleanupOnError(se);
        throw wrapInXAException(se);
      }
      finally
      {
        csf.resetCurrentContextManager(inDoubtCM);
      }

    }

    synchronized (tranState) {
View Full Code Here

      // RM also does not know about this xid.
      if (inDoubtCM == null)
        throw new XAException(XAException.XAER_NOTA);

      ContextService csf = ContextService.getFactory();

      csf.setCurrentContextManager(inDoubtCM);
      try
      {
        rm.rollback(inDoubtCM, xid_im);

        // close the connection/transaction since it can never be used again.
        inDoubtCM.cleanupOnError(StandardException.closeException());
        return;
      }
      catch (StandardException se)
      {
        // The rm threw an exception, clean it up in the approprate
        // context.  There is no transactionResource to handle the
        // exception for us.
        inDoubtCM.cleanupOnError(se);
        throw wrapInXAException(se);
      }
      finally
      {
        csf.resetCurrentContextManager(inDoubtCM);
      }

    }

    synchronized (tranState) {
View Full Code Here

      // RM also does not know about this xid.
      if (inDoubtCM == null)
        throw new XAException(XAException.XAER_NOTA);

      ContextService csf = ContextService.getFactory();

      csf.setCurrentContextManager(inDoubtCM);
      try
      {
        rm.forget(inDoubtCM, xid_im);

        // close the connection/transaction since it can never be used again.
        inDoubtCM.cleanupOnError(StandardException.closeException());
        return;
      }
      catch (StandardException se)
      {
        // The rm threw an exception, clean it up in the approprate
        // context.  There is no transactionResource to handle the
        // exception for us.
        inDoubtCM.cleanupOnError(se);
        throw wrapInXAException(se);
      }
      finally
      {
        csf.resetCurrentContextManager(inDoubtCM);
      }

    }

    throw new XAException(tranState.isPrepared ? XAException.XAER_NOTA : XAException.XAER_PROTO);
View Full Code Here

    /*
     * now we need to setup a context stack for the database creation work.
     * We assume the System boot process has created a context
     * manager already, but not that contexts we need are there.
     */
    ContextService csf = ContextService.getFactory();

    ContextManager cm = csf.getCurrentContextManager();
    if (SanityManager.DEBUG)
      SanityManager.ASSERT((cm != null), "Failed to get current ContextManager");

    // RESOLVE other non-StandardException errors.
    bootingTC = null;
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.context.ContextService

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.