JpaConfiguration.java 520 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 = "development-pu")
    public EntityManager entityManager;

}