users@glassfish.java.net

Persisting entities that are loaded at runtime

From: <glassfish_at_javadesktop.org>
Date: Mon, 24 Nov 2008 10:17:03 PST

I'm writing a program that uses JPA to persist entities created by plugins. The plugins are installed at runtime, so JPA doesn't know anything about them when it starts up. The problem that I'm running into is:

java.lang.IllegalArgumentException: Object: <classname>@8b62e0 is not a known entity type.

Is there a way to register the Class object with Persistence or the EntityManagerFactory? I'm relatively new to Glassfish/TopLink Essentials/JPA so any help would be appreciated.
[Message sent by forum member 'nalice' (nalice)]

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