201 words

Embedded mode usage question

2017-04-21 14:03

Hi there !

We're currently considering to try object db as a an embedable database for one of our microservices. The microservoice itself must be completely self-contained and must not depend on external software such as RDMS, requiring additional installation and support. However, this microservice will be a multi-threaded, multi-user web service and we did not get a complete understanding from your site/docs whether the object db embedded mode is intended for single-user / single thread access only or not. Is it ok to use object db in an embedded (non server) mode for a web app or web service, accessed by a number of end-users (consumers).





livotov's picture
Joined on 2017-04-21
User Post #1
2017-04-21 14:20

You can use ObjectDB in embedded mode to serve a multi threaded web application.

This is demonstrated for example on this tutorial.

For real concurrent multi threading you just have to use a separate EntityManager for every thread (e.g. EntityManager per request in a web application, as demonstrated in that tutorial), and actually there is no difference between client-server mode and embedded mode in your code. Both modes support multi threading.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #2,749
2017-04-21 14:38

That's the great news, thanks for a quick reply !

Will definitely give it a try then in our service POC.


Thanks and have a nice day,



livotov's picture
Joined on 2017-04-21
User Post #2

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