title: How to write a persistence provider for Glassfish
body: <p>I have a special data storage (<a href="https://github.com/mhgrove/Empire" rel="nofollow">Empire RDF</a>) I would like to use in my application with <a href="http://download.oracle.com/javaee/5/tutorial/doc/bncij.html" rel="nofollow">CMT</a> enabled.</p>
  
  <p>For that, I imagine I have to write a <a href="http://glassfish.java.net/nonav/javaee5/api/javax/persistence/spi/PersistenceProvider.html" rel="nofollow"><code>PersistenceProvider</code></a>, that I will then declare in a persistence.xml, with a jta-datasource and associated connection properties.</p>
  
  <p>As a consequence, I tried to, but I always face deployment issues related to <a href="http://grepcode.com/file/maven.glassfish.org/content/repositories/glassfish-releases/org.glassfish.persistence/jpa-connector/3.0/org/glassfish/persistence/jpa/PersistenceUnitLoader.java#PersistenceUnitLoader.loadPU%28org.glassfish.persistence.jpa.PersistenceUnitDescriptor%29" rel="nofollow">PersistenceUnitLoader#loadPU</a> (mainly the fact that it seems - to my ignorant eyes - that Glassfish confuses my PersistenceProvider with (Top/Eclipse)Link one).</p>
  
  <p>So, what is the recommended way to create a PersistenceProvider for Glassfish for a non standard (read non related to a RDBMS) JPA implementation ?</p>