Package org.apache.ojb.odmg

Examples of org.apache.ojb.odmg.TransactionImpl.lock()


            elements.add(entry);
            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
View Full Code Here


            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
        else
View Full Code Here

            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
        else
        {
View Full Code Here

        iter.add(entry);

        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.lock(entry, Transaction.WRITE);
            entry.prepareForPersistency(tx.getBroker());
        }
    }

    /**
 
View Full Code Here

    public Object setValue(Object obj)
    {
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.lock(this, Transaction.WRITE);
        }
        valueRealSubject = obj;
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        valueOID = new Identity(obj,broker);
        broker.close();
View Full Code Here

        iter.add(entry);

        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.lock(entry, Transaction.WRITE);
        }
    }

    /**
     * Returns <tt>true</tt> if the iteration has more elements. (In other
View Full Code Here

        this.size++;
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }
View Full Code Here

        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }

        // changing the position markers of entries:
View Full Code Here

        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }

        // changing the position markers of entries:
        int offset = 0;
View Full Code Here

        if (ok)
        {
            TransactionImpl tx = TxManagerFactory.instance().getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(key, Transaction.READ);
                tx.lock(value, Transaction.READ);
            }
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.