2

Is it posible to use Gilead for a GWT app and Glassfish 3.1 together? I've tried this in a servlet:

@PersistenceUnit
EntityManagerFactory emf;

@Override
public void init() throws ServletException {
    super.init();

    HibernateJpaUtil hibernateJpaUtil = new HibernateJpaUtil(emf);
    PersistentBeanManager persistentBeanManager =
        GwtConfigurationHelper.initGwtProxyBeanManager(hibernateJpaUtil);
    setBeanManager(persistentBeanManager);
}

However, it fails since the implementation provided by Glassfish of EntityManagerFactory is an EntityManagerFactoryWrapper and not an HibernateEntityManagerFactory.

I've seen that there is a HibernateJBossUtil which is used to avoid this problem in JBoss. But I couldn't find anything useful to get Gilead running in Glassfish.

Any idea?

Thanks.

EDIT: I forgot to say I added Hibernate support to Glassfish by using its update tool.

narduk
  • 964
  • 1
  • 9
  • 19

0 Answers0