Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PersistenceBroker.store()


            broker.store(dummy2);

            broker.store(smOne_1);
            broker.store(smOne_2);
// broker.clearCache();
            broker.store(smTwo_2);
            broker.store(smTwo_1);

            broker.commitTransaction();

            // now check if store was successful
View Full Code Here


            broker.store(smOne_1);
            broker.store(smOne_2);
// broker.clearCache();
            broker.store(smTwo_2);
            broker.store(smTwo_1);

            broker.commitTransaction();

            // now check if store was successful
            broker.clearCache();
View Full Code Here

                broker.beginTransaction();
                for (int j = innerLoops - 1; j >= 0; j--)
                {
                    key = new Repository.SMKey();
                    key.setName(name);
                    broker.store(key);
                }
                broker.commitTransaction();
            }
            finally
            {
View Full Code Here

        TestObjectDefaultCache obj = new TestObjectDefaultCache();
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        try
        {
            broker.beginTransaction();
            broker.store(obj);
            broker.commitTransaction();

            Identity oid = new Identity(obj, broker);
            obj = (TestObjectDefaultCache) broker.serviceObjectCache().lookup(oid);
            assertNotNull(obj);
View Full Code Here

        obj.setName(name);
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        try
        {
            broker.beginTransaction();
            broker.store(obj);
            broker.commitTransaction();

            Identity oid = new Identity(obj, broker);
            obj = (TestObjectDefaultCache) broker.serviceObjectCache().lookup(oid);
            assertNotNull(obj);
View Full Code Here

        dummy.setName(name);

        try
        {
            broker.beginTransaction();
            broker.store(obj);
            broker.store(dummy);
            broker.commitTransaction();

            Identity obj_oid = new Identity(obj, broker);
            Identity dummy_oid = new Identity(dummy, broker);
View Full Code Here

        try
        {
            broker.beginTransaction();
            broker.store(obj);
            broker.store(dummy);
            broker.commitTransaction();

            Identity obj_oid = new Identity(obj, broker);
            Identity dummy_oid = new Identity(dummy, broker);
            ObjectCache cache = broker.serviceObjectCache();
View Full Code Here

        try
        {
            broker = PersistenceBrokerFactory.defaultPersistenceBroker();

            broker.beginTransaction();
            broker.store(product);
            broker.commitTransaction();
        }
        catch (PersistenceBrokerException ex)
        {
            if (broker != null)
View Full Code Here

            broker = PersistenceBrokerFactory.defaultPersistenceBroker();

            broker.beginTransaction();
            for (int idx = 0; idx < products.length; idx++)
            {
                broker.store(products[idx]);
            }
            broker.commitTransaction();
        }
        catch (PersistenceBrokerException ex)
        {
View Full Code Here

            if (result != null)
            {
                broker.beginTransaction();
                result.setStock(result.getStock() - 1);

                broker.store(result);
                // alternative, more performant:
                // broker.store(result, ObjectModificationDefaultImpl.UPDATE);

                broker.commitTransaction();
                isSold = true;
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.