http://docs.jboss.org/hibernate/stable/ ... ation.html"The configuration for entity managers both inside an application server and in a standalone application reside in a persistence archive. A persistence archive is a JAR file which must define a persistence.xml file that resides in the META-INF folder. "
"When Persistence.createEntityManagerFactory() is called, the persistence implementation will search your classpath for any META-INF/persistence.xml files using the ClassLoader.getResource("META-INF/persistence.xml") method."
... so you SHOULD, I guess, be able to put a replacement jar earlier in the classpath, and from that persistence.xml config reference your original jar for classes to map.
I haven't tested this myself, though.