Package com.arjuna.ats.internal.jts

Examples of com.arjuna.ats.internal.jts.ControlWrapper


  static final TransactionImple getTransaction ()
  {
    TransactionImple tx = null;

    ControlWrapper otx = OTSImpleManager.current().getControlWrapper();

    if (otx != null)
    {
            synchronized (TransactionImple._transactions)
            {
        try
        {
          tx = (TransactionImple) TransactionImple._transactions.get(otx.get_uid());

          if (tx == null)
          {
            /*
             * If it isn't active then don't add it to the
View Full Code Here


       * If we have a synchronization list then we must be top-level.
       */
      if (_synchs != null)
      {
          boolean doSuspend = false;
          ControlWrapper cw = null;

          try
          {
              /*
               * Make sure that this transaction is active on the thread
               * before we invoke any Synchronizations. They are
               * TransactionalObjects and must have the context flowed to
               * them.
               */

              try
              {
                  //        cw = OTSImpleManager.systemCurrent().getControlWrapper();

                  cw = OTSImpleManager.current().getControlWrapper();

                  /*
                   * If there's no transaction incoming, then use the one that
                   * we got at creation time.
                   */

                  if ((cw == null) || (!controlHandle.equals(cw.getImple())))
                  {
                      //      OTSImpleManager.systemCurrent().resumeImple(controlHandle);

                      OTSImpleManager.current().resumeImple(controlHandle);

View Full Code Here

      boolean problem = false;
      SystemException exp = null;

      if (_synchs != null)
      {
          ControlWrapper cw = null;
          boolean doSuspend = false;

          try
          {
              //    cw = OTSImpleManager.systemCurrent().getControlWrapper();

              cw = OTSImpleManager.current().getControlWrapper();

              /*
               * If there isn't a transaction context shipped, then use the
               * one we had during creation.
               */

              if ((cw == null) || (!controlHandle.equals(cw.getImple())))
              {
                  //        OTSImpleManager.systemCurrent().resumeImple(controlHandle);

                  OTSImpleManager.current().resumeImple(controlHandle);

View Full Code Here

    //
    // This hack method does that job to workaround that bug
    private void hackJTS(final SubordinateTransaction subordinateTransaction) {
        if (subordinateTransaction instanceof TransactionImple) {
            final TransactionImple txImple = (TransactionImple) subordinateTransaction;
            final ControlWrapper controlWrapper = txImple.getControlWrapper();
            if (controlWrapper == null) {
                return;
            }
            final ControlImple controlImple = controlWrapper.getImple();
            if (controlImple == null) {
                return;
            }
            final ArjunaTransactionImple arjunaTransactionImple = controlImple.getImplHandle();
            if (arjunaTransactionImple == null) {
View Full Code Here

  static final TransactionImple getTransaction ()
  {
    TransactionImple tx = null;

    ControlWrapper otx = OTSImpleManager.current().getControlWrapper();

    if (otx != null)
    {
            synchronized (TransactionImple._transactions)
            {
        try
        {
          tx = (TransactionImple) TransactionImple._transactions.get(otx.get_uid());

          if (tx == null)
          {
            /*
             * If it isn't active then don't add it to the
View Full Code Here

       * If we have a synchronization list then we must be top-level.
       */
      if (_synchs != null)
      {
          boolean doSuspend = false;
          ControlWrapper cw = null;

          try
          {
              /*
               * Make sure that this transaction is active on the thread
               * before we invoke any Synchronizations. They are
               * TransactionalObjects and must have the context flowed to
               * them.
               */

              try
              {
                  //        cw = OTSImpleManager.systemCurrent().getControlWrapper();

                  cw = OTSImpleManager.current().getControlWrapper();

                  /*
                   * If there's no transaction incoming, then use the one that
                   * we got at creation time.
                   */

                  if ((cw == null) || (!controlHandle.equals(cw.getImple())))
                  {
                      //      OTSImpleManager.systemCurrent().resumeImple(controlHandle);

                      OTSImpleManager.current().resumeImple(controlHandle);

View Full Code Here

      boolean problem = false;
      SystemException exp = null;

      if (_synchs != null)
      {
          ControlWrapper cw = null;
          boolean doSuspend = false;

          try
          {
              //    cw = OTSImpleManager.systemCurrent().getControlWrapper();

              cw = OTSImpleManager.current().getControlWrapper();

              /*
               * If there isn't a transaction context shipped, then use the
               * one we had during creation.
               */

              if ((cw == null) || (!controlHandle.equals(cw.getImple())))
              {
                  //        OTSImpleManager.systemCurrent().resumeImple(controlHandle);

                  OTSImpleManager.current().resumeImple(controlHandle);

View Full Code Here

   * @return a JTA transaction that wraps the OTS transaction
   */
  private static Transaction controlToTx(String ior) {
    log.debug("controlToTx: ior: " + ior);

    ControlWrapper cw = createControlWrapper(ior);
    TransactionImple tx = (TransactionImple) TransactionImple
        .getTransactions().get(cw.get_uid());

    if (tx == null) {
      log.debug("controlToTx: creating a new tx - wrapper: " + cw);
      tx = new JtsTransactionImple(cw);
      putTransaction(tx);
View Full Code Here

    } else if (hasTransaction()) {
      log.debug("have tx mgr");
      Transaction tx = tm.getTransaction();
      log.debug("have arjuna tx");
      TransactionImple atx = (TransactionImple) tx;
      ControlWrapper cw = atx.getControlWrapper();
      log.debug("lookup control");
      Control c = cw.get_control();
      String ior = ORBManager.getORB().orb().object_to_string(c);
      log.debug("getTransactionIOR: ior: " + ior);
      return ior;
    } else {
      return null;
View Full Code Here

    Control control = org.omg.CosTransactions.ControlHelper.narrow(obj);
    if (control == null)
      log.warn("createProxy: ior not a control");

    return new ControlWrapper(control);
  }
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jts.ControlWrapper

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.