title: Should you default to the JPA provider of the application server?
body: <p>I have a 100% JPA2 compliant application which needs to be portable to many application servers.  Being JPA compliant (theoretically) means we can switch JPA providers via configuration (e.g. without changing source code) -- (right???).  </p>
  
  <p>When running within a servlet container (e.g. Tomcat, Jetty) the application is configured to run with Hibernate.  We choose Hibernate over TopLink and Eclipselink for its maturity and performance.  So far this works.</p>
  
  <p>However, when running within a Java EE application server, should we default to the JPA provider therein, or stick with Hibernate?</p>
  
  <p>I know within JBoss, the provider is Hibernate so it probably doesn't matter.  However, I <em>think</em> the provider within WebLogic is Eclipselink.  I have no idea what the provider WebSphere or Glassfish use, but I have seen detailed instructions on how to use Hibernate as the provider within those application servers.</p>
  
  <p>I guess another way to ask the question is what would we be missing by using Hibernate in these application servers?</p>