Package org.apache.ojb.odmg

Examples of org.apache.ojb.odmg.RuntimeObject


            {
                List regList = tx.getRegistrationList();
                while (iter.hasNext())
                {
                    toBeLocked = iter.next();
                    RuntimeObject rt = new RuntimeObject(toBeLocked, tx, false);
                    tx.lockAndRegister(rt, Transaction.READ, true, regList);
                }
            }
            finally
            {
View Full Code Here


        elements.add(index, entry);
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = getTransaction();
        if (checkForOpenTransaction(tx))
        {
            RuntimeObject rt = new RuntimeObject(this, tx);
            List regList = tx.getRegistrationList();
            tx.lockAndRegister(rt, Transaction.WRITE, false, regList);

            rt = new RuntimeObject(element, tx);
            tx.lockAndRegister(rt, Transaction.READ, regList);

            rt = new RuntimeObject(entry, tx, true);
            tx.lockAndRegister(rt, Transaction.WRITE, false, regList);
        }

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

        DListEntry entry = (DListEntry) elements.get(index);
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.deletePersistent(new RuntimeObject(entry, tx));
        }
        elements.remove(index);
        // changing the position markers of entries:
        int offset = 0;
        try
View Full Code Here

        {
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                List regList = tx.getRegistrationList();
                RuntimeObject rt = new RuntimeObject(this, tx);
                tx.lockAndRegister(rt, Transaction.WRITE, false, regList);

                rt = new RuntimeObject(key, tx);
                tx.lockAndRegister(rt, Transaction.READ, regList);

                rt = new RuntimeObject(value, tx);
                tx.lockAndRegister(rt, Transaction.READ, regList);

                rt = new RuntimeObject(entry, tx, true);
                tx.lockAndRegister(rt, Transaction.WRITE, false, regList);
            }
            return null;
        }
        else
View Full Code Here

            oldValue = correctEntry.getValue();
            i.remove();
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.deletePersistent(new RuntimeObject(correctEntry, tx));
            }
        }
        return oldValue;
    }
View Full Code Here

            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                List regList = tx.getRegistrationList();
                RuntimeObject rt = new RuntimeObject(this, tx);
                tx.lockAndRegister(rt, Transaction.WRITE, false, regList);

                rt = new RuntimeObject(o, tx);
                tx.lockAndRegister(rt, Transaction.READ, regList);

                rt = new RuntimeObject(entry, tx, true);
                tx.lockAndRegister(rt, Transaction.WRITE, false, regList);
            }
            return true;
        }
        else
View Full Code Here

            if(tx != null && tx.isOpen())
            {
                prepareRealSubject(tx.getBroker());
                if(realSubject != null)
                {
                    RuntimeObject rt = new RuntimeObject(realSubject, tx, false);
                    tx.lockAndRegister(rt, Transaction.READ, tx.getRegistrationList());
                }
            }
            else
            {
View Full Code Here

        iter.add(entry);

        TransactionImpl tx = dlist.getTransaction();
        if (tx != null)
        {
            RuntimeObject rt = new RuntimeObject(entry, tx, true);
            tx.lockAndRegister(rt, Transaction.WRITE, false, tx.getRegistrationList());
        }
    }
View Full Code Here

            try
            {
                while (iter.hasNext())
                {
                    toBeLocked = iter.next();
                    RuntimeObject rt = new RuntimeObject(toBeLocked, tx, false);
                    tx.lockAndRegister(rt, Transaction.WRITE, true);
                }
            }
            finally
            {
View Full Code Here

            elements.add(entry);
            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                RuntimeObject rt = new RuntimeObject(this, tx);
                tx.lockAndRegister(rt, Transaction.WRITE, false);

                tx.lock(o, Transaction.READ);

                rt = new RuntimeObject(entry, tx, true);
                tx.lockAndRegister(rt, Transaction.WRITE, false);
            }
            return true;
        }
        else
View Full Code Here

TOP

Related Classes of org.apache.ojb.odmg.RuntimeObject

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.