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

    Modifier and Type
    Method
    Description
    jakarta.persistence.EntityManagerFactory
    createEntityManagerFactory(String persistenceUnitName, DataSource dataSource, Properties properties)
    Creates the EntityManagerFactory.
  • Method Details

    • createEntityManagerFactory

      jakarta.persistence.EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, DataSource dataSource, Properties properties) throws 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:
      Exception - If fails to create the EntityManagerFactory.