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

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


     * 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();

    try
    {
      current.rollback();

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


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

    CurrentImple current = OTSImpleManager.current();

    if (current != null)
      current.set_timeout(seconds);
    else
      throw new UNKNOWN();
  }
View Full Code Here

   *         thread.
   */

  public int get_timeout () throws SystemException
  {
    CurrentImple current = OTSImpleManager.current();

    if (current != null)
    {
      int val = current.get_timeout();

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

    /*
     * If we get here then _theAction is not null.
     */

    CurrentImple current = OTSImpleManager.current();
    boolean valid = false;

    try
    {
      ControlWrapper currentTransaction = current.getControlWrapper();

      if (currentTransaction == null)
      {
        if (jtsLogger.loggerI18N.isWarnEnabled())
        {
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

    TransactionFactoryImple _localFactory = OTSImpleManager.factory();

    try
    {
      ControlImple cont = _localFactory.recreateLocal(ctx);
      CurrentImple current = OTSImpleManager.current();

      /*
       * If this thread is associated with any transactions, then they
       * will be lost in favour of this new hierarchy, unless we have
       * remembered them explicitly.
       */

      if (_remember)
      {
        try
        {
          _oldControl = current.suspendWrapper();
        }
        catch (Exception e)
        {
          throw new InterpositionFailed();
        }
      }

      current.resumeImple(cont);

      //      current.resume(cont.getControl());

      cont = null;
    }
View Full Code Here

   
    public void terminate ()
    {
  try
  {
      CurrentImple current = OTSImpleManager.current();

      if (current != null)
      {
    Control c = current.suspend();

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

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

    if (current != null)
    {
        current.resume(_currentControl);
        current = null;
    }
      }
      catch (Exception e)
      {
View Full Code Here

   
    protected OTSThread ()
    {
  try
  {
      CurrentImple current = OTSImpleManager.current();

      if (current != null)
      {
    _currentControl = current.get_control();
    current = null;
      }
  }
  catch (Exception e)
  {
View Full Code Here

    public void run ()
    {
  boolean shouldWork = false;
 
  CurrentImple current = OTSImpleManager.current();

  if (control != null)
  {
      System.out.println("New thread resuming transaction.");

      try
      {
    current.resume(control);
      }
      catch (Exception e)
      {
    System.err.println("Caught unexpected exception: "+e);
    System.exit(1);
      }
  }
 
  try
  {
      System.out.print("Non-creating thread trying to commit transaction. ");
     
      if (control == null)
    System.out.println("Should fail - no transaction associated with thread!");
      else
    System.out.println("Should succeed.");
   
      current.commit(true);

      System.out.print("Non-creating thread committed transaction. ");

      if (control == null)
      {
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.