On Feb 1, 2007, at 7:41 AM, Hans J. Prueller wrote:

Hi together,


I decided that it would be a valuable way to migrate existing CMP2.1 EJBs to OpenJPA, as this should also work

OUTSIDE a Java EE 5 (and therefore inside EJB2.1) container. The problem I see is that I have to provide the OpenJPA

mappings as Java5 annotations, and EJB2.1 projects are bound to Java 1.4 – without having annotations.

run geronimo under jdk 1.5.  This will work unless you are using corba.  The almost released 1.2 might work if you are using corba.


Is there a way of providing the mapping via XML-descriptor too?

yes, as per jpa spec.

Does anybody see other possible failures when running OpenJPA within a Java EE 1.4 container?

I'm not sure why you don't want to use annotations. You should use the geronimo 1.2 not-quite-released version which includes jpa and in particular openjpa support.  I converted the daytrader performance test app to use jpa and it works fine.  In particular you can use container managed entity managers/persistence contexts rather than app managed ones.  You might like to take a look at daytrader trunk, it has all the annotations and a jpa plan.  You do need to run geronimo under jdk 1.5 for this to work.

svn co https://svn.apache.org/repos/asf/geronimo/daytrader/trunk daytrader

david jencks





virtually hanzz...


http://hanzz.zapto.org (personal)
http://www.cse.dmu.ac.uk/~hansp (research)