Interface JpaManagedObjectSource.PersistenceFactory

  • All Known Implementing Classes:
    DataNucleusJpaManagedObjectSource, HibernateJpaManagedObjectSource
    Enclosing class:
    JpaManagedObjectSource
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface JpaManagedObjectSource.PersistenceFactory

    FunctionalInterface to create the EntityManagerFactory.

    Note: the EntityManagerFactory is required to be configured with the input DataSource.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.persistence.EntityManagerFactory createEntityManagerFactory​(java.lang.String persistenceUnitName, javax.sql.DataSource dataSource, java.util.Properties properties)
      Creates the EntityManagerFactory.
    • Method Detail

      • createEntityManagerFactory

        javax.persistence.EntityManagerFactory createEntityManagerFactory​(java.lang.String persistenceUnitName,
                                                                          javax.sql.DataSource dataSource,
                                                                          java.util.Properties properties)
                                                                   throws java.lang.Exception
        Creates the EntityManagerFactory.
        Parameters:
        persistenceUnitName - Persistence Unit name.
        dataSource - DataSource to use for the EntityManagerFactory. null if EntityManagerFactory to create and manage the DataSource.
        properties - Existing properties configured to the JpaManagedObjectSource.
        Returns:
        Configuration for the EntityManagerFactory to use the DataSource.
        Throws:
        java.lang.Exception - If fails to create the EntityManagerFactory.