we had a work around.
SessionFactoryUtils.releaseSession(session, ( entityManager.unwrap(org.hibernate.Session.class)).getSessionFactory());
releasing a session will reset every thing.