Class EntityManagerFactoryCreator

java.lang.Object
cloud.piranha.extension.eclipselink.EntityManagerFactoryCreator

@ApplicationScoped public class EntityManagerFactoryCreator extends Object
This bean takes care of creating an EntityManagerFactory using EclipseLink specific APIs.
Author:
arjan
  • Constructor Details

    • EntityManagerFactoryCreator

      public EntityManagerFactoryCreator()
  • Method Details

    • getAnnotationManager

      public AnnotationManager getAnnotationManager()
      Gets the AnnotationManager used to lookup entity classes etc
      Returns:
    • setAnnotationManager

      public void setAnnotationManager(AnnotationManager annotationManager)
      Sets the AnnotationManager used to lookup entity classes etc
      Parameters:
      annotationManager -
    • get

      public jakarta.persistence.EntityManagerFactory get(String unitName)
      Gets the EntityManagerFactory corresponding to the unit name. Created if needed.
      Parameters:
      unitName - name of the persistence unit
      Returns:
      EntityManagerFactory corresponding to the unit name