【问题标题】:GWT - configuring Gilead problemGWT - 配置 Gilead 问题
【发布时间】:2011-01-15 23:03:43
【问题描述】:

我关注this tutorial 并决定使用Gilead 来避免编写DTO 样板。

但是还没有成功。我按照教程建议做了:

  1. 让我在服务器端的 POJO 扩展 net.sf.gilead.pojo.java5.LightEntity

    public class Attachment extends LightEntity implements Serializable { ... }

  2. 让我的服务器端服务实现扩展 net.sf.gilead.gwt.PersistentRemoteService

    公共类 LoginServiceImpl 扩展 PersistentRemoteService 实现 LoginService { ...}

  3. 完全按照教程配置 beanManager。

当我尝试使用扩展 Gilead 的 LightEntity 的服务器端类时,我收到错误消息,好像没有 Gilead,只是限制了服务器代码。

这是我包含在构建路径中的 JAR:

【问题讨论】:

  • 我放弃了 Gilead,我正在编写普通的 DTO。不过,我会保留这个问题,也许我们会找到答案。

标签: java hibernate gwt dto gilead


【解决方案1】:

将您的 MusicStoreServiceImpl() 更改为

public MusicStoreServiceImpl() {
gileadHibernateUtil.setSessionFactory(com.google.musicstore.util.HibernateUtil
    .getSessionFactory());

PersistentBeanManager persistentBeanManager = new PersistentBeanManager();
persistentBeanManager.setPersistenceUtil(gileadHibernateUtil);
StatelessProxyStore sps = new StatelessProxyStore();
sps.setProxySerializer(new GwtProxySerialization());
persistentBeanManager.setProxyStore(sps);
setBeanManager(persistentBeanManager);

}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-21
    • 1970-01-01
    • 2011-06-01
    • 2011-01-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多