开发者

Glassfish 3.1 and Gilead

开发者 https://www.devze.com 2023-02-25 13:41 出处:网络
Is it posible to use Gilead for a GWT app and Glassfish 3.1 together? I\'ve tried this in a servlet: @PersistenceUnit

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

精彩评论

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

关注公众号