DB4O Datastores

DataNucleus supports persisting objects to DB4O datastores (using the datanucleus-db4o plugin). Support for DB4O is maturing and will be enhanced further in future releases. If you wish to help out in this effort either by contributing or by sponsoring particular functionality please contact us via the DataNucleus Forum.

Datastore Connection

DataNucleus supports 3 modes of operation of db4o - file-based, embedded-server-based and client-server based. In order to do so and to fit in with the JDO/JPA APIs we have defined the following means of connection.

The following persistence properties will connect to a local file-based DB4O running on your local machine

datanucleus.ConnectionURL=db4o:file:{my_db4o_file}
datanucleus.ConnectionUserName=
datanucleus.ConnectionPassword=

The filename (my_db4o_file) can be absolute OR relative.

The following persistence properties will connect to embedded-server-based DB4O running on with a local file

datanucleus.ConnectionURL=db4o:server:{my_db4o_file}
datanucleus.ConnectionUserName=
datanucleus.ConnectionPassword=

The filename (my_db4o_file) can be absolute OR relative.

The following persistence properties will connect as a client to a TCP/IP DB4O Server

datanucleus.ConnectionURL=db4o:{db4o_host}:{db4o_port}
datanucleus.ConnectionUserName=
datanucleus.ConnectionPassword=

DB4O doesn't itself use such URLs so it was necessary to define this DataNucleus-specific way of addressing DB4O.



Known Limitations

The following are known limitations of the current implementation

  • DB4O only allows versions to be of type long . This means that you cannot use the JDO version strategy of "DATE_TIME".