I have several EntityManagerFactory in my application, created using an
Ejb3Configuration using method (Ejb3Configuration.createEntityManagerFactory()).
The factory knows about every Entity because before the creation of the factory a added all the classes i need to the ejb3 configuration using the method Ejb3Configuration.addAnnotatedClass(Class clazz).
The point is, that i have to update in a certain point in time my Ejb3Configuration because there is annoter entity bean that my application has generated, so i use again the addAnnotatedClass method, but the factory
is not updated, so it doesn`t know about the new entity and i cant do any operation with that entity bean. If i want to update de factoty, i have to create a new EntityManagerFactory from the Ejb3Configuration updated, i dont know how good i could be, because the application is generating new Entity Beans constantly.
Any comments to make it will be appreciated.
|