There's another option with still a lot of casts involved, but at least it doesn't need reflection, which will give you back compile time checking:
public Connection getConnection(final EntityManager em) {
HibernateEntityManager hem = (HibernateEntityManager) em;
SessionImplementor sim = (SessionImplementor) hem.getSession();
return sim.connection();
}
You could of course make that even "prettier" with a viewfew instanceof
checks, but the version above works for me.