Package org.apache.ojb.odmg

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


        broker.close();

        // now update reference
        assertNotNull(obj_2);
        tx.begin();
        tx.lock(obj_2, Transaction.WRITE);
        references = obj_2.getAllReferences();
        CollectionReference ref = (CollectionReference) references.get(0);
        tx.lock(ref, Transaction.WRITE);
        ref.setRefName(nameRef+"_update");
        tx.commit();
View Full Code Here


        assertNotNull(obj_2);
        tx.begin();
        tx.lock(obj_2, Transaction.WRITE);
        references = obj_2.getAllReferences();
        CollectionReference ref = (CollectionReference) references.get(0);
        tx.lock(ref, Transaction.WRITE);
        ref.setRefName(nameRef+"_update");
        tx.commit();

        broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        obj_2 = (MainObject) broker.getObjectByIdentity(oid_2);
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.