KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this requirement to add entity classes to the persistence unit at runtime rather than specifying all of them in the persistence.xml. Can someone help me with the same? I am aware that Hibernate has its own mechanism of doing the same using: AnnotationConfiguration.addAnnotatedClass(Class) , etc - You can also add hibernate config ( *.hbm.xml ) files programmatically. The requirement is that without restarting the app server, I should be able to keep adding entity classes / their config (mapping) files to the persistence unit dynamically. But the solution to programmatically add entity classes / configuration files at runtime to the persistence unit should not be specific to a JPA implementation.
Tags (comma-separated)
Save Edits
Cancel