JPA Configuration without persistance.xml




I've been using Hibernate with JPA, and found it too slow, so am moving my project to use ObjectDB. My Jar is being held inside another application, so I don't want to have to rely on a persistance.xml file being in a particular place. When using Hibernate, I was able to do the following:

org.hibernate.cfg.AnnotationConfiguration config  = new AnnotationConfiguration();
org.hibernate.SessionFactory factory = config.buildSessionFactory();

Is it possible to do the equivalent thing with ObjectDB?


Thanks very much,



When using ObjectDB the persistence.xml is file optional.

Just annotate the classes and use them.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Thanks very much, I read on:

And wasn't sure.


I appreciate the quick reply!


Post Reply

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