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

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


    // locate and return the lock for a given TransactionLocal+Transaction tuple.
    // create it if it does not exist.
    private TransactionLocalLock findLock(final TransactionLocal local, final Transaction transaction) {

        TransactionImple transactionImple = (TransactionImple) transaction;
        Map<TransactionLocal, TransactionLocalLock> locks;
        // ideally for performance we should sync on the tx instance itself but that may have nasty
        // side effects so we use something else as the lock object for the sync block
        synchronized (LOCKS_MAP) {
            // ensure there is a holder for lock storage on the given tx instance.
            locks = (Map) transactionImple.getTxLocalResource(LOCKS_MAP);
            if (locks == null) {
                locks = new HashMap<TransactionLocal, TransactionLocalLock>();
                transactionImple.putTxLocalResource(LOCKS_MAP, locks);
            }
        }

        TransactionLocalLock transactionLocalLock;
        synchronized (locks) {
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.