Nested entity not loaded all the time; possible race condition?

20 views
Skip to first unread message

Ryan McFall

unread,
Feb 1, 2012, 5:03:44 PM2/1/12
to Google Web Toolkit
In an application using RequestFactory from GWT 2.3.0, I have the
following object structure:
Survey
-- List<ISurveyQuestion> thisSurveysQuestions
-- ChoiceGroup choiceGroup
-- List<IChoiceGroupItem> choices

A method is invoked which loads a Survey object by its ID on the
server side, as follows:

Request request = RequestFactory.getRequest();
request.loadSurveyByID(1).with (componentsToLoad).fire () ...

where componentsToLoad is an array of strings, containing (among
others):
"thisSurveysQuestions", "thisSurveysQuestions.choiceGroup",
"thisSurveysQuestions.choiceGroup.choices"

When this code is run within Eclipse, most of the time, but not all of
the time, both the choiceGroup for an individual ISurveyQuestion and
its associated choices are correctly loaded.

When I compile the module and deploy it, the choiceGroup object has
always been null every time that I have tried it.

Since it works some of the time in Eclipse, it doesn't seem like I
have one of the names of the properties spelled wrong in my .with( )
call, or that there's any other error. It seems more likely to be a
bug in the RequestFactory code.

Has anyone else seen behavior like this, or have ideas what could be
going wrong?

Thanks,
Ryan

Thomas Broyer

unread,
Feb 1, 2012, 5:26:26 PM2/1/12
to google-we...@googlegroups.com
I would have said it's http://code.google.com/p/google-web-toolkit/issues/detail?id=6710 but you said you're using 2.3, not 2.4; and it doesn't looks like http://code.google.com/p/google-web-toolkit/issues/detail?id=6115 either.

Anyway, if you use RF, stick to the latest version (run from trunk, possibly applying my patches, if you can), so first upgrade to 2.4 or trunk.

Ryan McFall

unread,
Feb 1, 2012, 9:59:03 PM2/1/12
to Google Web Toolkit
Hi Thomas:

I moved to 2.4, and the compiler told me about an error in my proxy
related to ChoiceGroup that I had not caught. Oone of the server side
methods was using an interface for which there was no proxy. I
remember complaining about the lack of tool support for this last
summer, with the fragility of unchecked strings in annotations, and
you had mentioned that better support would exist in the next version
of RF & the Eclipse plugin.

There was a reasonable amount of headache in moving to 2.4, but once
that was done, the code started working as expected on the deployed
version.

Thanks for your suggestion!
Ryan

On Feb 1, 5:26 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> I would have said
> it'shttp://code.google.com/p/google-web-toolkit/issues/detail?id=6710but
> you said you're using 2.3, not 2.4; and it doesn't looks
> likehttp://code.google.com/p/google-web-toolkit/issues/detail?id=6115
Reply all
Reply to author
Forward
0 new messages