Package javax.transaction

Examples of javax.transaction.NotSupportedException


        begin(getTransactionTimeoutMilliseconds(0L));
    }

    public Transaction begin(long transactionTimeoutMilliseconds) throws NotSupportedException, SystemException {
        if (getStatus() != Status.STATUS_NO_TRANSACTION) {
            throw new NotSupportedException("Nested Transactions are not supported");
        }
        TransactionImpl tx = new TransactionImpl(xidFactory, txnLog);
        timeoutTimer.schedule(tx, getTransactionTimeoutMilliseconds(transactionTimeoutMilliseconds));
        threadTx.set(tx);
        ((TransactionImpl)tx).setCurrentThread(Thread.currentThread());
View Full Code Here


   public void begin() throws NotSupportedException, SystemException
   {
      Transaction currentTx;
      if ((currentTx = getTransaction()) != null)
      {
         throw new NotSupportedException(Thread.currentThread() +
               " is already associated with a transaction (" + currentTx + ")");
      }
      DummyTransaction tx = new DummyTransaction(this);
      setTransaction(tx);
   }
View Full Code Here

   public void begin() throws NotSupportedException, SystemException
   {
      log.debug("beginning Spring transaction");
      if (TransactionSynchronizationManager.isActualTransactionActive())
      {
         throw new NotSupportedException("A Spring transaction is already active.");
      }
      currentTransaction = getPlatformTransactionManagerRequired().getTransaction(definition);
      getSynchronizations().afterTransactionBegin();
   }
View Full Code Here

          Status.STATUS_MARKED_ROLLBACK, Status.STATUS_ROLLING_BACK, Status.STATUS_UNKNOWN };
     
      // SystemException and NotSupportedException from tm.begin()
      Set<Exception> ees = new HashSet<Exception>();
      ees.add(new SystemException("KABOOM!"));
      ees.add(new NotSupportedException("KABOOM!"));
     
      // Loop through all states states twice changing the exception thrown
      // from tm.begin()
      for (int i = 0 ; i < allStates.length ; i++ ) {
        Iterator<Exception> iterator = ees.iterator();
View Full Code Here

        try {
            tm = getTransactionManager();
            transaction = tm.suspend();
        } catch (Exception e) {
            NotSupportedException nse =
                new NotSupportedException(e.getMessage());
            nse.initCause(e);
            throw nse;
        }

        runnable.run();

        try {
            tm.resume(transaction);
        } catch (Exception e) {
            try {
                transaction.setRollbackOnly();
            }
            catch(SystemException se2) {
                throw new GeneralException(se2);
            }
            NotSupportedException nse =
                new NotSupportedException(e.getMessage());
            nse.initCause(e);
            throw nse;
        }
    }
View Full Code Here

      {
        checkTransactionState();
      }
      catch (IllegalStateException e1)
      {
        throw new NotSupportedException(e1.getMessage());
      }
      catch (org.omg.CORBA.SystemException e2)
      {
        throw new javax.transaction.SystemException(e2.toString());
      }
    }

    try
    {
      TransactionImple.putTransaction(new TransactionImple());
    }
    catch (org.omg.CosTransactions.SubtransactionsUnavailable e3)
    {
      // shouldn't happen if we get here from the previous checks!

      throw new NotSupportedException(e3.getMessage());
    }
    catch (org.omg.CORBA.SystemException e4)
    {
      throw new javax.transaction.SystemException(e4.toString());
    }
View Full Code Here

      {
        checkTransactionState();
      }
      catch (IllegalStateException e1)
      {
        throw new NotSupportedException(e1.getMessage());
      }
      catch (Exception e2)
      {
        throw new javax.transaction.SystemException(e2.toString());
      }
View Full Code Here

    {
      checkTransactionState();
    }
    catch (IllegalStateException e1)
    {
      throw new NotSupportedException();
    }
    catch (Exception e2)
    {
      throw new javax.transaction.SystemException(e2.toString());
    }
View Full Code Here

       
        try {
            tm = getTransactionManager();
            transaction = tm.suspend();
        } catch (Exception e) {
            NotSupportedException nse =
                new NotSupportedException(e.getMessage());
            nse.initCause(e);
            throw nse;
        }
       
        runnable.run();
       
        try {
            tm.resume(transaction);
        } catch (Exception e) {
            try {
                transaction.setRollbackOnly();
            }
            catch(SystemException se2) {
                throw new GeneralException(se2);
            }
            NotSupportedException nse =
                new NotSupportedException(e.getMessage());
            nse.initCause(e);
            throw nse;
        }
    }
View Full Code Here

        else {

            String tid = getThreadMapping ();
            if ( tid != null ) {
                // error: no nested txs supported
                throw new NotSupportedException (
                        "Nested transaction not allowed here" );
            }

            try {
                tid = txmgrServer_.begin ( timeout_ );
View Full Code Here

TOP

Related Classes of javax.transaction.NotSupportedException

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.