How to configure where the ODB is stored?

#1

Hi,

The documentation is lacking in this respect. How do I configure where the ObjectDB database file is stored. I need to know where it is so I can inspect it with 'database explorer'. The docs say to set it to "$objectdb/db/points.odb" and that this defaults to "the installation directory of ObjectDB". BUT... I DIDN'T INSTALL OBJECTDB - my maven build downloaded it and embeded it. So, where is this file stored??? Also, the contents of the DB don't seem to be persisted between AppServer restarts. 

I'd just like to know how to configure it to be in my home directory. What is the syntax for this? Please could someone provide a concrete example. 

Thanks,

Alex

#2

You may specify any file path (e.g. an absolute path "C:\data\my.odb").

The $objectdb prefix refers to a special directory, the ObjectDB Home, which is either the directory in which the objectdb.jar file is located or the parent directory, as explained in this manual page.

On that manual page you can also read how to change the ObjectDB Home.

ObjectDB Support
#3

I configured objectdb.home property with this:

System.setProperty("objectdb.home", System.getProperty("user.home") + "/<projectname>/objectdb");

but i find 

log folder in the path defined for objectdb.home

but 

the .odb file is under tomcat bin directory

 

 

 

#4

If you specify a database file name with no path then the current default directory will be used, which could be the Tomcat bin directory.

Use the $objectdb prefix, e.g. "$objectdb/my.odb" to specify a database in the ObjectDB home directory.

ObjectDB Support

Reply