jpa/subsystem/src/main/java/org/jboss/as/jpa/container/NonTxEmCloser.java
public static void popCall() {
        Map<String, EntityManager> emStack = nonTxStack.pop();
        if (emStack != null) {
            for (EntityManager entityManager : emStack.values()) {
                try {
                    if (entityManager.isOpen()) {
                        entityManager.close();
                    }
                } catch (RuntimeException safeToIgnore) {
                    if (ROOT_LOGGER.isTraceEnabled()) {
                        ROOT_LOGGER.trace("Could not close (non-transactional) container managed entity manager." +
                            "  This shouldn't impact application functionality (only read " +
                            "operations occur in non-transactional mode)", safeToIgnore);
                    }
                }
            }
        }
    }
public static void popCall() {
        Map<String, EntityManager> emStack = nonTxStack.pop();
        if (emStack != null) {
            for (EntityManager entityManager : emStack.values()) {
                try {
                    if (entityManager.isOpen()) {
                        entityManager.close();
                    }
                } catch (RuntimeException safeToIgnore) {
                    if (ROOT_LOGGER.isTraceEnabled()) {
                        ROOT_LOGGER.trace("Could not close (non-transactional) container managed entity manager." +
                            "  This shouldn't impact application functionality (only read " +
                            "operations occur in non-transactional mode)", safeToIgnore);
                    }
                }
            }
        }
    }
public static void popCall ( ) { Map < String , EntityManager > emStack = nonTxStack . pop ( ) ; if ( emStack != null ) { for ( EntityManager entityManager : emStack . values ( ) ) { try { if ( entityManager . isOpen ( ) ) { entityManager . close ( ) ; } } catch ( RuntimeException safeToIgnore ) { if ( ROOT_LOGGER . isTraceEnabled ( ) ) { ROOT_LOGGER . trace ( "Could not close (non-transactional) container managed entity manager." + "  This shouldn't impact application functionality (only read " + "operations occur in non-transactional mode)" , safeToIgnore ) ; } } } } }
current session bean invocation is ending, close any transactional entity managers created without a JTA
transaction.
current session bean invocation is ending close any transactional entity managers created without a JTA transaction .