It all depends on the cache you use (specified in OJB.properties). ObjectCacheDefaultImpl will never get flushed automatically (which can be problematic for transactional isolation). ObjectCachePerBrokerImpl will get flushed on broker.close().
-----Original Message----- From: Jacob Hookom [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 11:29 AM To: [EMAIL PROTECTED] Subject: PersistenceBroker State Question Pertaining to caching and speed of the PersistenceBroker, am I on the right track for structuring calls like so: // Method OjbUserDao.insertUser() public void insertUser(User user) throws Exception { // calls PersistenceBrokerFactory.defaultPersistenceBroker() PersistenceBroker broker = OjbDaoFactory.getInstance().createBroker(); try { broker.beginTransaction(); broker.store(user, ObjectModificationDefaultImpl.INSERT); broker.commitTransaction(); } finally { broker.close(); } } Does the cache in general get flushed when I call broker.close()? I'm just using the Broker in Single-VM mode. Regards, Jacob Hookom Student, University of Wisconsin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]