users@glassfish.java.net

Re: Persisting entities that are loaded at runtime

From: <glassfish_at_javadesktop.org>
Date: Mon, 24 Nov 2008 21:39:36 PST

<jar-file /> is a good start. However, the problem is a little more complicated than I explained earlier. The plugins are being loaded in from a database with a custom class loader. I suppose that I could write the plugins out to disk and then update the persistence.xml file to reflect the change. I'd rather not do that if at all possible. Is there a way to have it scan bytecode or jar files for @Entity annotations without writing them to disk?

Also, when is persistence.xml read? Is is at Persistence.createEntityManagerFactory("persistenceUnit")?

I'll keep experimenting to see what I can come up with. Again, any information that could shed light on the situation would be greatly appreciated.

Thanks for your response,
Alex
[Message sent by forum member 'nalice' (nalice)]

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