requestfactory

Requestfactory hibernate session-per-request

泄露秘密 提交于 2019-12-11 11:48:47
问题 I am trying to update my application to use a session-per-request pattern so I can move to newer GWT versions (my entities don't save correctly past 2.4 - GWT >2.4 RequestFactory not saving child object changes I have implemented a request filter, and it appeared to be working correctly - I can pull data down to the client no problem. However, when I try to save an entity, it errors out because it does not find an active transaction: org.hibernate.HibernateException: saveOrUpdate is not valid

GWT pass Objectify Cursor from Server to Client with RequestFactory and show more pages in DataGrid

眉间皱痕 提交于 2019-12-11 11:41:59
问题 I am brand new to cursors and have the following method: public List<Venue> findPage(Subject subject, Objectify ofy, int pageSize) { final Business business = (Business) subject.getSession().getAttribute(BUSINESS_ATTRIBUTE); final Query<Venue> query = ofy.query(Venue.class).filter(BUSINESS_ATTRIBUTE, business); final String encodedCursor = (String) subject.getSession().getAttribute(VENUE_CURSOR_CONDITION); if (encodedCursor != null) { query.startCursor(Cursor.fromWebSafeString(encodedCursor))

Problem running a GWT 2.4 App on Tomcat

纵然是瞬间 提交于 2019-12-11 07:12:50
问题 I have a problem running my gwt2.4rc1 application in a tomcat. The problem occurs when I try to make a requestfactory call. Then I get the exception at the bottom. When I run GWT in development mode everything works fine. The gwt-dev. jar is in the lib folder of my webapp. I am using maven for dependency management. Could there be a problem with my configuration? I already had the error with gwt2.4 beta. If there are any other information required to solve this problem I am glad to provide

ClassCastException with GWT/RequestFactory on WebLogic

◇◆丶佛笑我妖孽 提交于 2019-12-11 03:16:24
问题 I'm setting up a GWT application based on GWT/RequestFactory on client side, and JPA/EclipseLink over WebLogic on server side. However, during development, everytime I change something on the server-side code (it can be an entity, the DAO, or even a comment in a Java file!), I get a ClassCastException between 2 apparently similar classes when I try to use my application, and the only way to get rid of it is to restart my WebLogic server. Even redeploying the application doesn't help. Feb 10,

RequestFactory service inheritance on the client in GWT 2.4

左心房为你撑大大i 提交于 2019-12-10 10:45:15
问题 GWT 2.4 brings service inheritance on the client (issue 6234, issue 6035). I've been waiting for this future for a long time, as it saves a lot of duplicated code on the client. I've started implementing it, but so for with mixed success. This is my code: public interface BaseEntityRequest<T> { Request<Void> put(T entity); Request<List<T>> getAllOrderBy(String propertyName); Request<List<T>> getRangeAndFilter(int limit,int offset, QueryInfoProxy queryInfo); } @Service(value = EgdDao.class,

GWT RequestFactory not persisting attached entities

故事扮演 提交于 2019-12-09 07:36:21
问题 I'm trying to get the hang of the new RequestFactory API and having a really tough time of it. My domain models consist of a Staffer , a Person and an Office . Staffer has a Person and an Office as fields. When I try to save updates to a Staffer instance in GWT, on the server-side persist() call I see the updates in its primitive/String fields, but I do not see updates to the attached Person or Office objects. Here is how I'm affecting the edits on the GWT side: private void

RequestFactory slow on Android

不想你离开。 提交于 2019-12-09 06:40:11
问题 I am using RequestFactory with appengine and android. It has been working great, however when I retrieve a list of objects of any size(around 400) it has a very delayed response. It appears that the transfer of data happens fairly quickly(~4 secs), however I do not get the onSuccess() callback until much later(1-2 mins or greater). I am guessing this could be slow performance of parsing within requestfactory. My objects are just POJOs with about 10 fields of text and longs. My question is has

RequestFactory Entity's parameter: List<OfOtherEntity> is null on client. On server is ok

匆匆过客 提交于 2019-12-08 13:37:24
问题 I am learning RequestFactory. I have simple example working. Now I would like to implement for RF those Entities from below: Server package @Entity public class Pizza implements Identifiable, Versionable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Version private Long version; private String name; @ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) private List<Ingredient> ingredients; /* Getters and Setters */ } @Entity public class Ingredient

RequestFactory and offline clients

早过忘川 提交于 2019-12-08 07:35:22
问题 I'm trying to create an application which is able to work even when network is down. The idea is to store data returned from RequestFactory on the localStorage, and to use localStorage when network isn't available. My problem - I'm not sure exactly how to differentiate between server errors(5XX, 4XX, ...) and network errors. (I assume that on both cases my Receiver.onFailure() would be called, but I still don't know how to identify this situation) Any help would be appreciated, Thanks, Gilad.

GWT RF: How to share the same code in client and server

孤者浪人 提交于 2019-12-07 23:59:36
问题 I would like to use the same code to sort and manipulate objects in client and server sides. But I am facing a problem since in client we need a proxy interface representing the class of the server. Is there a way to use the same interface in both?, I know RF has a mechanism to copy bean attributes from the server instance to the client instance when it is sent through the wire. 回答1: As Thomas says in his answer, the only way in current GWT to have shared code in client and sever is