Package org.apache.ojb.broker

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


    conControl.setReturnValue(false, 1);
    pb.beginTransaction();
    pbControl.setVoidCallable(1);
    pb.delete(entity);
    pbControl.setVoidCallable(1);
    pb.commitTransaction();
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);

    pbControl.replay();
View Full Code Here


    conControl.setReturnValue(false, 1);
    pb.beginTransaction();
    pbControl.setVoidCallable(1);
    pb.delete(entity);
    pbControl.setVoidCallable(1);
    pb.commitTransaction();
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);

    pbControl.replay();
View Full Code Here

    pb1Control.setVoidCallable(1);
    pb2.serviceConnectionManager();
    pb2Control.setReturnValue(cm, 2);
    pb2.beginTransaction();
    pb2Control.setVoidCallable(1);
    pb2.commitTransaction();
    pb2Control.setVoidCallable(1);
    pb2.close();
    pb2Control.setReturnValue(true, 1);
    pb1.commitTransaction();
    pb1Control.setVoidCallable(1);
View Full Code Here

    conControl.setReturnValue(false, 1);
    pb.beginTransaction();
    pbControl.setVoidCallable(1);
    pb.delete(entity);
    pbControl.setVoidCallable(1);
    pb.commitTransaction();
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);

    dsControl.replay();
View Full Code Here

        {
            broker = PersistenceBrokerFactory.defaultPersistenceBroker();

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

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

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

                broker.commitTransaction();
                isSold = true;
            }
        }
        catch (PersistenceBrokerException ex)
        {
View Full Code Here

            if (result != null)
            {
                broker.beginTransaction();
                broker.delete(result);
                broker.commitTransaction();
                isDeleted = true;
            }
        }
        catch (PersistenceBrokerException ex)
        {
View Full Code Here

        {
            broker = PersistenceBrokerFactory.defaultPersistenceBroker();

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

            // 2. start broker transaction
            broker.beginTransaction();
            // 3. now ask broker to store the edited object
            broker.store(product);
            // 4. commit transaction
            broker.commitTransaction();
        }
        catch (OJBRuntimeException ex)
        {
            // rollback in case of errors
            if (broker != 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.