Object Database

You can configure the central object database parameters in Jease/WEB-INF/web.xml.

Configure the database folder

The name of the database folder can be specified in two ways:

  • If the database name doesn't include a slash, the database folder will be created directly in user home (prefixed by "db4o" or "perst", see below).
  • If the database name includes a slash (java.io.File.separator), the value will be interpreted as path for the database folder. Please note: if a slash is present or not is determined by java.io.File.separator, so you'll need to specify paths with correct slashes according to your platform ("/" on Linux/Mac OS X, "\" on Windows).

Configuration for Linux / Mac OS X

<context-param>
 <param-name>JEASE_DATABASE_NAME</param-name>
 <param-value>/var/database/test/</param-value>
</context-param>

Configuration for Windows

<context-param>
 <param-name>JEASE_DATABASE_NAME</param-name>
 <param-value>C:\database\test\</param-value>
</context-param>

Please note: the specified folder contains all data, so if you want to make a backup of your CMS, simply backup the specified directory. That's it.

Configure the database engine

Jease supports the following open-source object-databases:

  • db4o (jfix.db4o.engine.PersistenceEngineDb4o)
  • Perst (jfix.db4o.engine.PersistenceEnginePerst)

db4o is the default engine. If you want to use Perst as engine, you can configure this in WEB-INF/web.xml:

<context-param>
   <param-name>
     JEASE_DATABASE_ENGINE
   </param-name>
   <param-value>
     jfix.db4o.engine.PersistenceEnginePerst
   </param-value>
</context-param>

If you want to integrate another database with Jease, you can implement the interface for jfix.db4o.engine.PersistenceEngine. Please use existing implementations as guides.

Last modified on 2012-01-19 by Maik Jablonski

Want to contribute?

1970-01-01

Do you want to contribute to Jease? Writing documentation is a good place to get started and will help to get people becoming more familiar with Jease. Any contribution is appreciated.