ObjectDB ObjectDB

ODB 2 JDO enhancement


If I label a class @PersistenceCapable do I still need to explicitly enhance? Do I need a package.jdo file?

This question relates to experiences with ODB 1, in which one has to:

a) create a package.jdo, and

b) run the Enhancer

In my experience, using this with Tomcat, and running the enhancer in the contextListener class, there would often be errors relating to 'class not persistent capable'. So, in ODB 2 is there a way to mark a class as @PersistentCapable, and then let ODB take care of enhancement automatically?

Alternatively, is there a best practice for enhancement in a web environment.

(and in a dev environment using JRebel)?


Annotations (@PersistenceCapable / @Entity) replace the XML metadata (e.g. package.jdo).

Enhancement is another issue. ObjectDB 2 can do almost everything without enhancement (all JPA operations and almost all JDO operations). But enhanced classes are faster - see  here.

You can use all the three enhancement methods (as explained on that page) also with a web application.


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


To post on this website please sign in.