/JPA-HikariCP-without-Spring

JPA with Hikari Connection Pool without Spring

Primary LanguageJavaMIT LicenseMIT

Sometime you don't need all the goodies of Spring and have to go alone. This example implements JPA using high performance Hikari connection pool without Spring.

Inspired by

This demo programmatically builds JPA persistence configuration, so that persistence.xml is not needed.

If you want to use persistence.xml, just rename src/main/resources/META-INF/persistence.xml.not_used

and replace EntityManagerFactory emf = new HibernatePersistenceProvider().createContainerEntityManagerFactory(archiverPersistenceUnitInfo(), config());

with EntityManagerFactory emf = Persistence.createEntityManagerFactory("com.codspire.db.mgmt");