Hi,
    I am using ojb1.0_rc4, ODMG api with OJB queries and mysql4.
    When running OJB queries using the broker, is it necessary to begin, commit or 
abort the broker transaction?
    Which one should I use? Example 1 or 2?
    1) 
        ...
        PersistenceBroker broker = ((HasBroker) transaction).getBroker();
        broker.beginTransaction();
        Iterator it=broker.getIteratorByQuery(q);   
        //do something with the iterator
        broker.commitTransaction();        
        ...
    2)
        ....
        PersistenceBroker broker = ((HasBroker) transaction).getBroker();
        Iterator it=broker.getIteratorByQuery(q);
        //do something with the iterator
        ....

Thanks,
    Jair Jr

Reply via email to