Package com.arjuna.ats.internal.jts.orbspecific

Examples of com.arjuna.ats.internal.jts.orbspecific.CurrentImple


  if (_originalTransaction != null)
  {
      throw new INVALID_TRANSACTION();
  }

  CurrentImple current = OTSImpleManager.current();

  _originalTransaction = current.suspend();

  if (jtsLogger.logger.isDebugEnabled())
  {
      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC,
                 com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "TopLevelTransaction::begin - suspend transaction "+_originalTransaction);
View Full Code Here


   * thread may not be the same one which does the work, so we
   * cannot do thread association at the interceptor level. We must
   * do it when the invoked method actually gets called.
   */

  CurrentImple curr = OTSImpleManager.current();

  /*
   * Probably separate the underlying work out so that we can
   * call that directly. No real harm at present since the hard
   * work represents most of the overhead and has to be done
   * anyway.
   */

  curr.contextManager().associate();
    }
View Full Code Here

  try
  {
      if (_originalTransaction != null)
      {
    CurrentImple current = OTSImpleManager.current();

    current.resume(_originalTransaction);

    _originalTransaction = null;
      }
  }
  catch (Exception e)
View Full Code Here

   * thread may not be the same one which does the work, so we
   * cannot do thread association at the interceptor level. We must
   * do it when the invoked method actually gets called.
   */

  CurrentImple curr = OTSImpleManager.current();

  /*
   * Probably separate the underlying work out so that we can
   * call that directly. No real harm at present since the hard
   * work represents most of the overhead and has to be done
   * anyway.
   */

  curr.contextManager().associate();
    }
View Full Code Here

    }

    public static final synchronized int tx_begin ()
    {
  int toReturn = tx.TX_OK;
  CurrentImple current = OTSImpleManager.current();

  if (!__tx_allow_nesting)
  {
      /*
       * Already have a transaction?
       */

      try
      {
    Control control = current.get_control();

    if (control != null)
    {
        /*
         * Have a transaction already, and not allowed to
         * create nested transactions!
         */

        toReturn = tx.TX_PROTOCOL_ERROR;
        control = null;
    }
      }
      catch (Exception e)
      {
    // something went wrong!
   
    toReturn = tx.TX_FAIL;
      }
  }

  if (toReturn == tx.TX_OK)
  {
      try
      {
    current.begin();
      }
      catch (Exception e)
      {
    toReturn = tx.TX_FAIL;
      }
View Full Code Here

     */

    public static final synchronized int tx_rollback ()
    {
  int toReturn = tx.TX_OK;
  CurrentImple current = OTSImpleManager.current();

  try
  {
      current.rollback();
  }
  catch (NoTransaction e1)
  {
      toReturn = tx.TX_NO_BEGIN;
  }
View Full Code Here

    }
   
    public static final synchronized int tx_commit ()
    {
  int toReturn = tx.TX_OK;
  CurrentImple current = OTSImpleManager.current();
  Boolean report_heuristics = (Boolean) __tx_report_heuristics.get(Thread.currentThread());

  if (report_heuristics == null)
      report_heuristics = new Boolean(true)// default TRUE
     
  try
  {
      boolean when_return = report_heuristics.booleanValue();
   
      current.commit(when_return);
  }
  catch (NoTransaction e1)
  {
      toReturn = tx.TX_NO_BEGIN;
  }
View Full Code Here

    }

    public static final synchronized int tx_set_transaction_timeout (int timeout)
    {
  int toReturn = tx.TX_OK;
  CurrentImple current = OTSImpleManager.current();

  try
  {
      current.set_timeout(timeout);
  }
  catch (Exception e)
  {
      toReturn = tx.TX_FAIL;
  }
View Full Code Here

      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "AtomicTransaction::begin ()");
    }

    // already begun?

    CurrentImple current = OTSImpleManager.current();

    current.begin();

    synchronized (_theStatus)
    {
      if (_theAction != null)
      {
        throw new INVALID_TRANSACTION(ExceptionCodes.ALREADY_BEGUN,
            CompletionStatus.COMPLETED_NO);
      }

      _theAction = current.getControlWrapper();
    }

    _theStatus = current.get_status();

    if (jtsLogger.logger.isDebugEnabled())
    {
      jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "AtomicTransaction::begin create "
          + _theAction);
View Full Code Here

     * OK to use current since we have just guaranteed that the transaction
     * is the same as current. Use current rather than saved control since
     * it will do thread tracking for us.
     */

    CurrentImple current = OTSImpleManager.current();

    /*
     * Release our handle first, since current is about to destroy the
     * action control.
     */

    try
    {
      current.commit(report_heuristics);

      _theStatus = Status.StatusCommitted;
    }
    catch (NoTransaction e)
    {
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jts.orbspecific.CurrentImple

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.