Is there an update on running ObjectDB purely in-memory?

#1

Hi,

I know that this has been asked, but the last time seems to be two years ago, so I'd like to know whether there is a change or an outlook regarding the topic:

Is it possible, or planned, to run ObjectDB purely in-memory, without a any file on disk? Note that "file on RAM disk", which was proposed in the past, is not an option for the application I have in mind. It would need to be true in-memory mode, as supported by SQL databases like H2 or SQLite.

Thanks,
David

#2

We had this as an unreleased feature for a while, and following your post it is now included in version 2.6.4.

In the configuration you can define suffixes that indicate memory only databases:

    <database>
      <extensions drop="temp,tmp" memory="mem,memory" />
    </database>

Any database url or path with one of these specified suffixes will be handled as a memory database, e.g.:

    EntityManagerFactory emf =
        Persistence.createEntityManagerFactory("objectdb:test.mem");

The exact path (as long as it is ended with such suffix) has no real effect except in logging, etc.

Since this is a new feature we will appreciate any feedback.

ObjectDB Support
#3

Hi,

when i am adding below one in objectDb.conf file  

     <database>
      <extensions drop="temp,tmp" memory="mem,memory"/>
    </database>

i could not open explorer. then i erase this line then i could able to run the explorer and server.

 EntityManagerFactory emf = Persistence.createEntityManagerFactory("objectdb:test.mem");

After running program it gives Exception:

org.xml.sax.SAXParseException; lineNumber: 22; columnNumber: 52; cvc-complex-type.2.4.a: Invalid content was found starting with element 'extensions'. One of '{activation}' is expected.

.....................................

......................................

com.objectdb.o.UserException: Failed to validate xml file D:\ObjectDB\objectdb-2.7.3_06\objectdb.conf line 22: cvc-complex-type.2.4.a: Invalid content was found starting with element 'extensions'. One of '{activation}' is expected.

....................................................

..................................................
How can i solve this problem.

Thanks

#4

Actually a complete setting of the <database> configuration element should follow this format, when only the <extensions> element is set to use in-memory mode.

ObjectDB Support

Reply