users@glassfish.java.net

Re: modularity and jpa

From: <glassfish_at_javadesktop.org>
Date: Mon, 26 Feb 2007 06:18:55 PST

The problem I see with your solution is inheritance.

If you have a class that has inheritance in the same table, i.e. all child records are in the table too, then if you add a new class to the tree at dynamically at run time after persistence provider initialization, it could well have to modify the table structure, adding fields, etc.

That's nasty to have as a side-effect of an addToPersistenceUnit method.

If you are having to do that type of think I think you should have to unload and re-load the persistence provider classes, as at least that way you can more expect the delay for initialization.
[Message sent by forum member 'stephenconnolly' (stephenconnolly)]

http://forums.java.net/jive/thread.jspa?messageID=205250