static void unBindAll ( Consumer < EntityManager > function ) { final Map < EntityManagerFactory , EntityManager > entityManagerMap = entityManagerMap ( false ) ; if ( entityManagerMap != null ) { Iterator < EntityManager > iterator = entityManagerMap . values ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { EntityManager entityManager = iterator . next ( ) ; function . accept ( entityManager ) ; iterator . remove ( ) ; } doCleanup ( ) ; } }
Unbinds all EntityManagers regardless of EntityManagerFactory currently associated with the context .