The first thing the GWT application does at startup is to request the current user from the server through RequestFactory. This blocks because I need user properties to know how to proceed. It only takes <500 ms, but it really annoys me that the application is blocked during this time. I already have a User on the server when jsp is generated, so why not just add the serialized user to jsp and completely exclude this request?
I have two problems: I cannot do this:
- I need to convert User to UserProxy
- I need to serialize UserProxy so that GWT can easily deserialize.
I have not found a good way to do # 1. Does this logic seem like ServiceLayerDecorator without an easy way to isolate? Maybe I'm wrong.
The second seems easier with ProxySerializer But how can I access the requestfactory when I'm on the server? You cannot call GWT.createon the server.
I studied AutoBeans , but this does not apply to # 1 above. My UserProxy has links to collections of other EntityProxy that I would like to support.
source
share