I noticed that calling createEntityManagerFactory(null) will use the default Persistence Unit (PU) in the configuration file. Sometimes the classpaths get really messed up at deployment and I’d really like to see the name of the current PU for a given EntityManagerFactory. Is there any way to do this? Also, I would love to go so far as to see the entire properties map for the EntityManagerFactory.
I noticed that calling createEntityManagerFactory(null) will use the default Persistence Unit (PU) in the
Share
I found a way to do it if the provider is hibernate:
Note that
emis an opened EntityManager created from an EntityManagerFactory. Also, like the comments? That’s right, the Hibernate team is full of surprises again. Even though users gave feedback begging not to deprecate the only method that can help me, they are going full steam ahead. Note this link.I’ll upvote any good suggestions for a more stable JPA provider. Hibernate is just getting too unstable. This is definitely not the first issue of this kind that I had to workaround.