1、获得hibernate Session
Session session = entityManager.unwrap(org.hibernate.Session.class);
2、获得Java.sql.Connection
Session session = (org.hibernate.Session) em.getDelegate();
SessionFactoryImplementor sf = (SessionFactoryImplementor) session.getSessionFactory();
java.sql.Connection conn = sf.getConnectionProvider().getConnection();