Working in codebase that currently uses Hibernate 3.6.3 :’( and am attempting to do a multi-phase upgrade to get on the latest Hibernate version. I’m fairly new to the configuration and setup of Hibernate so I apologize if any of my understanding seems off. We currently use Ejb3Configuration because at Spring startup we want to be able to register Properties, AnnotatedClasses and EventListeners.
FYI trying to upgrade to 4.3.11 in the first pass
Did some research about how to migrate off of Ejb3Configuration and still be able to create an EntityManagerFactory and most of what I read has referenced Persistence.createEntityManagerFactory(). My concern with this is that it seems like that has a requirement for a
persistence.xml file. Additionally it seems like you need to provide a
persistenceUnitName to the method which needs to correlate to something in the XML file. From what I can tell we have no
persistence.xml file because of how our product is a platform which allows any number of DBs to be hooked up to it for the ones we support.
Does anyone have a good way forward to move away from Ejb3Configuration and still be able to programmatically create an EntityManagerFactory, while also being able to somehow utilize Properties, AnnotatedClasses and EventListeners? Let me know if any more context is needed.