ObjectDB ObjectDB

Duplicatable and Disposable JPA Repository for Unit Testing


Hi Folks,

I seek an in-memory JPA implementation which can be easily instantiated, populated, and then duplicated for use in separate tests.  Tests might be JUnit or Fitnesse based.  There is no reason for file-system storage (preferably there would be none).  The ability to "duplicate" the populated repository is pretty important, as this allows individual tests to execute quickly (very little spin-up time and no need to pre-populate the db) and to execute without side-effects from other tests (db instance is not shared between tests).

Is this use-case appropriate for ObjectDB?

Many thanks, Robin.


Currently ObjectDB does not support pure memory storage, but you can run it on a RAM drive to get the effect of a memory database. It would probably be faster than any existing JPA / Memory Database combination. We plan to support pure direct memory storage in a future version, and this could be provided in a short time if requested by a new OEM customer or a company that would like to sponsorship this feature.

Duplication should be very easy with ObjectDB - just copy the database file when it is closed (or use online backup if it has to remain open) and you get a new separate database with the same initial content.

ObjectDB Support

Many thanks.

We will likely use H2 or Derby for this role (even though Duplication is not supported), but will keep an eye on the ObjectDB project for future consideration.



To post on this website please sign in.