ObjectDB ObjectDB

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

edit
delete
#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
edit
delete
#3

Thank you,

the answer is very helpful.

Regards,

Vladimir

edit
delete

Reply

To post on this website please sign in.