I have a special data storage (Empire RDF) I would like to use in my application with CMT enabled.
For that, I imagine I have to write a PersistenceProvider, that I will then declare in a persistence.xml, with a jta-datasource and associated connection properties.
As a consequence, I tried to, but I always face deployment issues related to PersistenceUnitLoader#loadPU (mainly the fact that it seems – to my ignorant eyes – that Glassfish confuses my PersistenceProvider with (Top/Eclipse)Link one).
So, what is the recommended way to create a PersistenceProvider for Glassfish for a non standard (read non related to a RDBMS) JPA implementation ?
Writing a PersistenceProvider is in fact a quite stepforward task.
PersistenceProviderinterface. In my case, it was a subclass of EmpireJPAPersistenceProvider. Do not forget you can use properties read frompersistence.xmlusingpersistenceUnitInfos.getProperties(), but only in thePersistenceProvider#createContainerEntityManagerFactorymethod !persistence.xml, write<provider>mycompany.MyProvider</provider>