Do you have any preferred way of finding out whether ObjectDb is my EntityManager's JPA Provider?
I know there are problems with using getDelegate ( http://weblogs.java.net/blog/ss141213/archive/2009/05/be_careful_whil.html ) but on the other hand unwrap is not very portable ( https://forums.oracle.com/forums/thread.jspa?threadID=2149162 ). It would be nice if the <provider> element of the PeristenceUnit were visible in one of the Properties sets returned by the EntityManager and EntityManagerFactory, but its not.
So I am left with
EntityManager.getDelegate() instanceof com.objectdb.jdo.PMImpl
or
EntityManagerFactory instanceof com.objectdb.jpa.EMF.
Or putting something in my properties for this sole purpose...
<property name="uk.co.his.jpa.provider" value="ObjectDb" />
At the momment I'll stick with the latter...