Creating a JPA Provider
java, jpa
Solution
You start by implementing `javax.persistence.spi.PersistenceProvider` interface and specifying your implementation using `provider` element within persistence unit declaration:
<persistence-unit name="myUnit">
<provider>com.mypackage.CustomPersistenceProvider</provider>
...
</persistence-unit>
That gives you an entry point for creating your own `EntityManagerFactory` and, consequently, EntityManager.
The $64,000 question here, though, is why you would want to do something like this? If this is related to your Lazy Hibernate JPA using SOAP question then this is probably not the right approach to take.
Problem
Does anyone know how to create your own JPA provider? I was considering making a custom JPA provider that could interface with a SOAP webservice we use. However, I can't seem to find any document describing how to create your own JPA provider. Where should I start looking?