@ Override public final EntityManager createEntityManager ( Map map ) { // For Application managed persistence context, type is always EXTENDED if ( isOpen ( ) ) { return new EntityManagerImpl ( this , map , transactionType , PersistenceContextType . EXTENDED ) ; } throw new IllegalStateException ( "Entity manager factory has been closed." ) ; }
Create a new application - managed EntityManager with the specified Map of properties . This method returns a new EntityManager instance each time it is invoked . The isOpen method will return true on the returned instance .