At the server dev meeting we held this morning, Lance asked if OpenJPA 
can handle new @Entity classes without a restart. The answer is yes. I 
created a new class Foo, annotated it @Entity, and redeployed the 
already-running bundle that it's a part of. OpenJPA created the Foo 
table and happily ran with it.

A small wrinkle that I'm currently exploring is that it seems to work a 
lot better if the @Entity class and the code that uses it for the first 
time are in the same bundle. In my codebase, I've got the Foo entity in 
an API bundle, and the code that saves a Foo is in an Impl bundle. This 
made OpenJPA a little wiggy. I'm going to see if moving the 
entity-annotated class inside the Impl bundle helps. This would be a 
slight drag on the elegance of our code model, which would then require 
a Foo APi interface and a FooModel that implements Foo and contains the 
JPA \ annotations.

Will report when I know how this works.

-- 
Chris Tweney, Senior Software Developer
Educational Technology Services
University of California, Berkeley
[email protected]
_______________________________________________
oae-dev mailing list
[email protected]
http://collab.sakaiproject.org/mailman/listinfo/oae-dev

Reply via email to