174 words

ObjectDB and Hibernate in one JVM?

#1
2013-03-14 17:44

Hi all,

I need to persist my application data and also access a legacy RDBMS system in the same Java application. Currently I use Hibernate for both purposes.

I've heard ObjectDB is much faster than Hibernate, so I want to try the it to deal with my application data, but I still need some ORM system to access RDBMS.

Is it possible to use both ObjectDB and Hibernate in the same application? Both of the product include its own copy of javax.persistence.XXX packages. I wonder if they will clash. How can I explicitly select persistence provider?

Regards,

Vladimir

tsichevski
tsichevski's picture
Joined on 2013-03-14
User Post #1
#2
2013-03-14 20:29

You can use both Hibernate and ObjectDB in the same Java application.

If the Hibernate version that you are using has different version of the javax.persistence than the one that ObjectDB includes, you may have to put ObjectDB and Hibernate in a specific order in the classpath (try both options).

You may also try using objectdb-jee.jar, which is the same as objectdb.jar, but without javax.persistence.

You should specify the requested persistence provider in the persistence.xml file.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #1,448
#3
2013-03-14 20:53

Thank you,

the answer is very helpful.

Regards,

Vladimir

tsichevski
tsichevski's picture
Joined on 2013-03-14
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.
Attachments:
Maximum file size: 32 MB
Cancel