开发者

Glassfish 3.1 and Gilead

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(persistentBeanMana开发者_StackOverflow社区ger);
}

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜