n EJB 3.0 RC1, I used to be able to do this to get the current SQL Dialect for the underlying Hibernate Session Factory...
ManagedEntityManagerFactory factory = (ManagedEntityManagerFactory) context.lookup("java:managedEntityFactories/EMSEntityManager"); HibernateEntityManagerFactory hemf = (HibernateEntityManagerFactory)factory.getEntityManagerFactory( ); sqlDialect = ((SessionFactoryImpl)hemf.getSessionFactory()).getDialect();
you can get the session from the em and then the sf from the session.