Q1. Which JPA implementation is smallest in size (as I want to have my application’s size as small as possible)?
对于JPA 1.0:
> Hibernate实体管理器3.4.0.GA:~4.9MB
> EclipseLink 1.1.3:~4.7MB
> OpenJPA 1.2.2:~2.7MB(我不确定这个,现在没有测试,所以我可能会遗漏一些罐子)
我会远离TopLink Essentials.
对于JPA 2.0:
> DataNucleus 2.0.3:~3.7MB
> EclipseLink 1.2和2.0:~4.8MB
> Hibernate实体管理器3.5.0-最终:~5.8MB
> OpenJPA 2.0.0-beta3:未测量(仍处于测试阶段)
这些措施已在我的宠物项目上完成(包括JDBC驱动程序以外的依赖项).就个人而言,即使对于桌面应用,我也不会仅根据尺寸选择.
Q2. How to find the value of the tag in the persistence.xml file.
> DataNucleus:org.datanucleus.jpa.PersistenceProviderImpl
> EclipseLink:org.eclipse.persistence.jpa.PersistenceProvider
> Hibernate:org.hibernate.ejb.HibernatePersistence
> OpenJPA:org.apache.openjpa.persistence.PersistenceProviderImpl
> TopLink Essentials:oracle.toplink.essentials.PersistenceProvider