ObjectDB ObjectDB

Access to client/server database from multiple applications

#1

Is there a preferred way to run a client-server database so that updates from one application are immediately visible to another?

The way I managed this was to run PersistenceManagerFactory.getDataStoreCache().evictAll(true,MyClass.class) to ensure that a query on MyClass would contain updated data.  This seems messy - is there a way to configure things so that the evictAll() call is not needed?

#2

You can use evictAll if it works for you. Note that if the L2 data cache is enabled you have to use refresh or refreshAll in order to bypass that cache as well.

Other options that could work are to use a PersistenceManagerFactory with retain values set to false or a new PersistenceManager for new operations (i.e. PersistenceManager per request).

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Setting the PersistenceManagerFactory.retainValues to false works fine.  Thanks for the help. 

Post Reply