users@glassfish.java.net

modularity and jpa

From: <glassfish_at_javadesktop.org>
Date: Thu, 22 Feb 2007 08:19:31 PST

Hello.
I am actually creating a netbeans suite, which depends on multiple modules.
The scheme here is not specific to netbeans, it could be the same with any application that uses multiple jars, and might have other ones coming anytime. It is just to give an idea of the type of modularity.
I have modules with each having entity classes. Some modules have classes that inherit from classes in other modules, both being entities.
My current problem lies with the obligation to somehow indicate within the persistence.xml all jars/classes/whatever that will be handled by the PU. I can not reliably forge that file at start, nor can i forge it during application lifetime. I am not able to have a persistence unit that covers the application, whatever its form.
I first tried to indicate in the persistence.xml of a module the total class list of other modules that might be used, but that is just asking for it to break. If i add an other module with new inherited classes, i will have persistence errors unless i also update base module. Also, that would imply that someone can

Is there a way to tell the persistence to use whatever is thrown at it and only report errors if classes are not defined as persistable entity? By the way, i actually use toplink.

I might have thought in the wrong direction, JPA might not be able to do that, i do not know... I am pretty lost at the moment.
[Message sent by forum member 'pepe' (pepe)]

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