Is there a way to detect which JPA provider is used when only a EntityManager handle is available?
Since EntityManagers are often proxied, looking at the class doesn’t work too well. Is there a standard property for this in EntityManager or EntityManagerFactory getProperties map?
AFAIK, no. But you can use the getDelegate() method and see what it returns. For Hibernate, it returns the Hibernate
Sessioninstance, for example. Just getting the name of the class of the delegate returned should give you an idea of the underlying provider.