示例#1
0
  // -------------------------------------------------------------------------
  //
  // Initialization of Remote service : must be done before any server call !
  //
  // -------------------------------------------------------------------------
  @Override
  public void init() throws ServletException {
    super.init();

    //	Bean Manager initialization
    setBeanManager(
        GwtConfigurationHelper.initGwtStatelessBeanManager(
            new HibernateUtil(HibernateUtilities.getSessionFactory())));

    commentServiceSystemImpl = new CommentServiceSystemImpl();
  }
  /** Servlet initialisation */
  @Override
  public void init() throws ServletException {
    super.init();

    WebApplicationContext ctx = getApplicationContext();

    HibernateUtil hibernateUtil = new HibernateUtil();
    hibernateUtil.setSessionFactory((SessionFactory) ctx.getBean("sessionFactory"));
    PersistentBeanManager persistentBeanManager =
        GwtConfigurationHelper.initGwtStatelessBeanManager(hibernateUtil);
    setBeanManager(persistentBeanManager);
  }