Home » Support » Forum » ObjectDB and Hibernate in one JVM?

ObjectDB and Hibernate in one JVM?

#1

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

#2

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)
#3

Thank you,

the answer is very helpful.

Regards,

Vladimir


Post Reply

To post a reply and/or subscribe to update notifications - please login