JpaConfiguration.java
518 Bytes
package org.legrog.configuration;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
* JPA configuration class, used by all classes extending JpaRepository
*/
public class JpaConfiguration {
/**
* Injectable interface for persistence handling
*/
@Produces
@RequestScoped
@PersistenceContext(unitName = "migration-pu")
public EntityManager entityManager;
}