Package org.odmg

Examples of org.odmg.Transaction.commit()


        }
        catch (ObjectNameNotFoundException ex)
        {
            fail("Could not found bound DList in new tx");
        }
        tx.commit();

        db.close();
    }

View Full Code Here


        Identity oid = new Identity(example, ((HasBroker)tx).getBroker());

        try
        {
            db.bind(example, bindingName);
            tx.commit();
        }
        catch (ObjectNameNotUniqueException ex)
        {
            tx.abort();
            fail(ex.getMessage());
View Full Code Here

        catch (ObjectNameNotFoundException ex)
        {
            fail("lookup by name: " + bindingName + " should not be unknown");
        }

        tx.commit();

        // looking up object by OID should return same Object as by name
        assertEquals("lookups should return identical object", example, lookedUp1);

        try
View Full Code Here

        try
        {
            tx.begin();
            db.unbind(bindingName);
            tx.commit();
        }
        catch (ObjectNameNotFoundException ex)
        {
            fail("Can't unbind " + bindingName + ": "+ex.getMessage());
        }
View Full Code Here

        Article example = createArticle();

        try
        {
            db.bind(example, name);
            tx.commit();
        }
        catch (ObjectNameNotUniqueException ex)
        {
            tx.abort();
            fail(ex.getMessage());
View Full Code Here

        tx = odmg.newTransaction();
        tx.begin();
        try
        {
            db.unbind(name);
            tx.commit();
        }
        catch (ObjectNameNotFoundException ex)
        {
            tx.abort();
            fail("name " + name + "should be known");
View Full Code Here

            Article value = (Article) db.lookup(name);
        }
        catch (ObjectNameNotFoundException ex)
        {
            // OK !
            tx.commit();
            // close database
            try
            {
                db.close();
            }
View Full Code Here

            Master master_1 = populatedMasterFKnoPK(tx, 5, timestamp);
            Master master_2 = populatedMasterFKnoPK(tx, 5, timestamp);

            database.makePersistent(master_1);
            database.makePersistent(master_2);
            tx.commit();

            // Check stored objects
            OQLQuery query = odmg.newOQLQuery();
            query.create("select masters from " + Master.class.getName() + " where masterText like $1");
            query.bind("%" + timestamp);
View Full Code Here

            Master master_1 = populatedMasterFKinPK(tx, 5, timestamp);
            Master master_2 = populatedMasterFKinPK(tx, 5, timestamp);

            database.makePersistent(master_1);
            database.makePersistent(master_2);
            tx.commit();

            // Check stored objects
            OQLQuery query = odmg.newOQLQuery();
            query.create("select masters from " + Master.class.getName() + " where masterText like $1");
            query.bind("%" + timestamp);
View Full Code Here

            tx.lock(master_1, Transaction.WRITE);
            tx.lock(master_2, Transaction.WRITE);
            tx.lock(master_3, Transaction.WRITE);
            tx.lock(master_4, Transaction.WRITE);
            tx.commit();

            tx.begin();
            OQLQuery query = odmg.newOQLQuery();
            query.create("select masters from " + Master.class.getName() + " where masterText like $1");
            query.bind("%" + timestamp);
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.