open fun setExtendedPersistenceContexts(extendedPersistenceContexts: MutableMap<String, String>): Unit
Specify the extended persistence contexts for EntityManager lookups, as a Map from persistence unit name to persistence context JNDI name (which needs to resolve to an EntityManager instance).
JNDI names specified here should refer to persistence-context-ref entries in the Java EE deployment descriptors, matching the target persistence unit and being set up with persistence context type Extended.
In case of no unit name specified in the annotation, the specified value for the default persistence unit will be taken (by default, the value mapped to the empty String), or simply the single persistence unit if there is only one.
This is mainly intended for use in a Java EE environment, with all lookup driven by the standard JPA annotations, and all EntityManager references obtained from JNDI. No separate EntityManagerFactory bean definitions are necessary in such a scenario, and all EntityManager handling is done by the Java EE server itself.