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

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


   * 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


   * 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

   * 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 short height () throws SystemException
    {
  System.out.println("height "+Thread.currentThread());

  CurrentImple current = OTSImpleManager.current();
  org.omg.CosTransactions.Control control = current.get_control();
  org.omg.CosTransactions.Control ptr = control;

  if (ptr != null)
  {
      System.out.println("trangrid_i.height - found implicit transactional context.");
View Full Code Here

  return m_height;
    }

    public short width () throws SystemException
    {
  CurrentImple current = OTSImpleManager.current();
  org.omg.CosTransactions.Control control = current.get_control();
  org.omg.CosTransactions.Control ptr = control;

  if (ptr != null)
  {
      System.out.println("trangrid_i.width - found implicit transactional context.");
View Full Code Here

  return m_width;
    }

    public void set (short n, short m, short value) throws SystemException
    {
  CurrentImple current = OTSImpleManager.current();
  org.omg.CosTransactions.Control control = current.get_control();

  if (control != null)
  {
      System.out.println("trangrid_i.set - found implicit transactional context!");
View Full Code Here

    public AtomicObject ()
    {
  super(ObjectType.ANDPERSISTENT);

  CurrentImple current = OTSImpleManager.current();

  _value = 0;

  try
  {
      current.begin();

      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
    _value = 0;

    current.commit(false);
      }
      else
    current.rollback();
  }
  catch (Exception e)
  {
      System.out.println("AtomicObject "+e);
  }
View Full Code Here

    }

    public synchronized boolean incr (int value)
    {
  boolean res = false;
  CurrentImple current = OTSImpleManager.current();

  try
  {
      current.begin();

      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
    _value = _value + value;

    current.commit(false);
    res = true;
      }
      else
    current.rollback();
  }
  catch (Exception e)
  {
      System.out.println(e);
      e.printStackTrace();
View Full Code Here

    }

    public synchronized boolean set (int value)
    {
  boolean res = false;
  CurrentImple current = OTSImpleManager.current();   

  try
  {
      current.begin();

      if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
      {
    _value = value;

    current.commit(false);
    res = true;
      }
      else
    current.rollback();
  }
  catch (Exception e)
  {
      System.out.println(e);
      e.printStackTrace();
View Full Code Here

    }

    public synchronized int get () throws TestException
    {
  boolean res = false;
  CurrentImple current = OTSImpleManager.current();   
  int value = -1;

  try
  {
      current.begin();

      if (setlock(new Lock(LockMode.READ), 0) == LockResult.GRANTED)
      {
    value = _value;

    current.commit(false);
    res = true;
      }
      else
    current.rollback();
  }
  catch (Exception e)
  {
      System.out.println(e);
      e.printStackTrace();
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.