Package org.apache.ojb.broker.accesslayer

Examples of org.apache.ojb.broker.accesslayer.ConnectionManagerIF.executeBatch()


        Zoo zoo1 = new Zoo();
        zoo1.setName("BatchModeTest Zoo #1");
        broker.store(zoo1);

        conMan.executeBatch();

        Mammal m1 = new Mammal();
        m1.setName("BatchModeTest Mammal #1");
        m1.setAge(5);
        m1.setNumLegs(4);
View Full Code Here


        m3.setNumLegs(4);
        m3.setZooId(zoo3.getZooId());
        zoo3.getAnimals().add(m3);
        broker.store(m3);

        conMan.executeBatch();

        broker.delete(m1);

        conMan.executeBatch();
View Full Code Here

        conMan.executeBatch();

        broker.delete(m1);

        conMan.executeBatch();

        broker.delete(zoo1);
        broker.delete(m2);
        broker.delete(zoo2);
        broker.delete(m3);
View Full Code Here

        broker.delete(m2);
        broker.delete(zoo2);
        broker.delete(m3);
        broker.delete(zoo3);

        conMan.executeBatch();
        broker.commitTransaction();
    }

    public void testMassInsertDelete()
    {
View Full Code Here

            // 3. commit objects.
            commitAllEnvelopes(broker);

            // 4. execute batch
            connMan.executeBatch();

            // 5.Update all Envelopes to new CleanState
            setCleanState();

        }
View Full Code Here

        public void beforeCompletion()
        {
            if (log.isDebugEnabled()) log.debug("beforeCompletion was called, nothing to do");
            ConnectionManagerIF cm = serviceConnectionManager();
            if(cm.isBatchMode()) cm.executeBatch();
            // close connection immediately when in JTA-tx to avoid bad reports from server con-pool
            if(cm.isInLocalTransaction())
            {
                // we should not be in a local tx when performing tx completion
                log.warn("Seems the used PersistenceBroker handle wasn't closed, close the used" +
View Full Code Here

                    {
                        _pb.delete(entry.cacheObject);
                    }
                    entry.state = state.commit();
                }
                connMan.executeBatch();
            }
            finally
            {
                connMan.setBatchMode(saveBatchMode);
            }
View Full Code Here

                    pbh.close();
                }
                handleList.clear();
            }
            ConnectionManagerIF cm = serviceConnectionManager();
            if(cm.isBatchMode()) cm.executeBatch();
            // close connection immediately when in JTA-tx to avoid bad reports from server con-pool
            if(cm.isInLocalTransaction())
            {
                // we should not be in a local tx when performing tx completion
                log.warn("Seems the used PersistenceBroker handle wasn't closed, close the used" +
View Full Code Here

            // 5. write objects.
            writeAllEnvelopes(needsReusePrepare);

            // 6. execute batch
            connMan.executeBatch();

            // 7. Update all Envelopes to new CleanState
            cleanupEnvelopes(needsReusePrepare);

            // 6. commit cleanup
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.