Package com.arjuna.ats.internal.jta.transaction.arjunacore

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple


     * @throws NotSupportedException
     */
    Transaction beginUserTransaction(final UserTransactionID userTransactionID) throws SystemException, NotSupportedException {
        this.getUserTransaction().begin();
        // get the tx that just got created and associated with the transaction manager
        final TransactionImple newlyAssociatedTx = TransactionImple.getTransaction();
        final Uid uid = newlyAssociatedTx.get_uid();
        this.userTransactions.put(userTransactionID, uid);
        return newlyAssociatedTx;
    }
View Full Code Here


     * @throws NotSupportedException
     */
    Transaction beginUserTransaction(final UserTransactionID userTransactionID) throws SystemException, NotSupportedException {
        this.getUserTransaction().begin();
        // get the tx that just got created and associated with the transaction manager
        final TransactionImple newlyAssociatedTx = TransactionImple.getTransaction();
        final Uid uid = newlyAssociatedTx.get_uid();
        this.userTransactions.put(userTransactionID, uid);
        return newlyAssociatedTx;
    }
View Full Code Here

/* 121 */     return TRANSACTION_MANAGER;
/*     */   }
/*     */
/*     */   public boolean containsValue(TransactionLocal transactionLocal, Transaction transaction)
/*     */   {
/* 145 */     TransactionImple transactionImple = (TransactionImple)transaction;
/* 146 */     if (transactionImple.isAlive()) {
/* 147 */       return transactionImple.getTxLocalResource(transactionLocal) != null;
/*     */     }
/* 149 */     return false;
/*     */   }
View Full Code Here

/* 149 */     return false;
/*     */   }
/*     */
/*     */   public Object getValue(TransactionLocal transactionLocal, Transaction transaction)
/*     */   {
/* 161 */     TransactionImple transactionImple = (TransactionImple)transaction;
/* 162 */     if (transactionImple.isAlive()) {
/* 163 */       return transactionImple.getTxLocalResource(transactionLocal);
/*     */     }
/* 165 */     return null;
/*     */   }
View Full Code Here

/* 165 */     return null;
/*     */   }
/*     */
/*     */   public void storeValue(TransactionLocal transactionLocal, Transaction transaction, Object value)
/*     */   {
/* 178 */     TransactionImple transactionImple = (TransactionImple)transaction;
/* 179 */     if (transactionImple.isAlive())
/* 180 */       transactionImple.putTxLocalResource(transactionLocal, value);
/*     */     else
/* 182 */       throw new IllegalStateException("Can't store value in a TransactionLocal after the Transaction has ended");
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   public void lock(TransactionLocal local, Transaction transaction)
/*     */     throws InterruptedException
/*     */   {
/* 194 */     TransactionImple transactionImple = (TransactionImple)transaction;
/* 195 */     if (transactionImple.isAlive())
/*     */     {
/* 199 */       TransactionLocalLock lock = findLock(local, transaction);
/* 200 */       if (lock.lock(transactionImple)) {
/* 201 */         return;
/*     */       }
View Full Code Here

/* 213 */     lock.unlock();
/*     */   }
/*     */
/*     */   private TransactionLocalLock findLock(TransactionLocal local, Transaction transaction)
/*     */   {
/* 229 */     TransactionImple transactionImple = (TransactionImple)transaction;
/*     */     Map locks;
/* 233 */     synchronized ("__LOCKS_MAP")
/*     */     {
/* 235 */       locks = (Map)transactionImple.getTxLocalResource("__LOCKS_MAP");
/* 236 */       if (locks == null) {
/* 237 */         locks = new HashMap();
/* 238 */         transactionImple.putTxLocalResource("__LOCKS_MAP", locks);
/*     */       }
/*     */     }
/*     */     TransactionLocalLock transactionLocalLock;
/* 243 */     synchronized (locks)
/*     */     {
View Full Code Here

     * @param transactionLocal The associated transaction local.
     * @param transaction      The associated transaction.
     * @return true if a value exists within the specified transaction, false otherwise.
     */
    public boolean containsValue(final TransactionLocal transactionLocal, final Transaction transaction) {
        TransactionImple transactionImple = (TransactionImple) transaction;
        return (transactionImple.getTxLocalResource(transactionLocal) != null ? true : false);
    }
View Full Code Here

     * @param transactionLocal The associated transaction local.
     * @param transaction      The associated transaction.
     * @return The value of the transaction local.
     */
    public Object getValue(final TransactionLocal transactionLocal, final Transaction transaction) {
        TransactionImple transactionImple = (TransactionImple) transaction;
        return transactionImple.getTxLocalResource(transactionLocal);
    }
View Full Code Here

     * @param transaction      The associated transaction.
     * @param value            The value of the transaction local.
     */
    public void storeValue(final TransactionLocal transactionLocal, final Transaction transaction,
                           final Object value) {
        TransactionImple transactionImple = (TransactionImple) transaction;
        transactionImple.putTxLocalResource(transactionLocal, value);
    }
View Full Code Here

TOP

Related Classes of com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple

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.