How I can register/unregister new entity class (with annotation or ORM XML) at runtime after EMF is initialized and first EntityManager are created. I know about similar questions, for example: Adding entity classes dynamically at runtime
The difference in the level of dynamism: we use OSGI plugins that can be installed/uninstalled at runtime and can contatais entity classes for own data.
That functionality already implemented using JDO/DataNucleus and works in production about 3 years. But JDO seems to be dead (at Apache too). DataNucleus has relatively small adoption and only one active (and good) developer (that sad because project very interesting in many ways ).
How to do something similar with popular JPA implementations?