EntityManagerFactoryAccessor getEntityManagerFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for EntityManagerFactoryAccessor getEntityManagerFactory method.

This code example shows how to use the following methods:getEntityManagerFactory
        // Set the participate flag, to avoid binding again the EntityManagerHolder, and to avoid 
        // unbinding it if it is already part of another transaction 
        boolean participate = false; 
        if (TransactionSynchronizationManager.hasResource(getEntityManagerFactory())) 
            // If there is an active transaction, just reuse it 
            participate = true; 
            LOGGER.debug("Opening JPA EntityManager in OpenEntityManagerInterceptor"); 
                // If we are not part of another transaction, create the EntityManager and bind it 
                // to the TransactionSynchronizationManager 
                EntityManager em = createEntityManager(); 

getEntityManagerFactory Method Overview
Return the JPA EntityManagerFactory that should be used to create EntityManagers.
See Code Examples for other Spring Framework EntityManagerFactoryAccessor Methods: