165 words

Multi-tenant setup

2017-01-05 17:14

Hi, does anybody have experience with multi tenant setup of objectDB.

For example using multiple schema or multiple database. How to handle connections between app (Jboss Wildfly) and pass query request to appropriate database, how to dynamically add new database or schema.

There are lot of discussions on how to do it with hibernate




emil_peric's picture
Joined on 2016-11-01
User Post #3
2017-01-11 14:09

Many ObjectDB users use ObjectDB with multiple databases. It is very easy when accessing databases directly (by database path). It is more tricky when using ObjectDB within an application server as automatic injection of entity managers in Java EE and JPA is static.

ObjectDB supports a dynamic schema, if your application generates entity classes dynamically (e.g. using CGLIB, javassist, asm, bcel). However, you will lose one of the main benefits of using a Java object database, which is the simplicity of representing persisted data using staticially defined POJO classes. A popular alternative approach it to use static Java classes for the common data and maps (as persistent fields) to store specific tenant data as key/value pairs.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #2,680

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB