GWT RPC Call receives a return object from another GWT RPC call

I have a strange problem (I hope you can help): I am working on a GWT web application that has a time when more than 4-5 GWT RPC calls are made at the same time - depending on the time.

From time to time - once every 15 calls, maybe? The returned object from one call gets "assigned" to another. I have evidence of this using the client-side gwt-log library.

Here's the callback object of the HistoryChangesCount call, also assigned to the modelGetTemplates call.

Thus, this threw a ClassCastException in the client file that made the call on the same line as the onSuccess method.

Do you have any tips on how I can avoid this?

PS - I register every response.toString () object at the error level. I know this is not the best practice. This is just for troubleshooting.

[14:38:01.026] "(-:-) 2014-04-03 14:38:01,025 [ERROR] getHistoryChangesCount - HistoryPreviewFacet - SUCCESS RETURNED: HistoryChangesCount{dateToNumberOfChangesMap={Mon Mar 31 03:00:00 GMT+300 2014=3}, lastUpdatedOn=Mon Mar 31 11:11:02 GMT+300 2014}
"
[14:38:01.163] "(-:-) 2014-04-03 14:38:01,162 [ERROR] modelingGetTemplates - ModelingTemplatesDropdown - SUCCESS RETURNED: HistoryChangesCount{dateToNumberOfChangesMap={Mon Mar 31 03:00:00 GMT+300 2014=3}, lastUpdatedOn=Mon Mar 31 11:11:02 GMT+300 2014}
"
[14:38:01.175] "(-:-) 2014-04-03 14:38:01,174 [ERROR] Browser: null
java.lang.ClassCastException
    at Unknown.iCb(StackTraceCreator.java:174)
    at Unknown.sd(StackTraceCreator.java:508)
    at Unknown.Txn(Throwable.java:46)
    at Unknown.kIc(Cast.java:46)
    at Unknown.rff(ModelingTemplatesDropdown.java:79)
    at Unknown.bXi(AsyncWrapperForRPCManager.java:38)
    at Unknown.Loe(RequestCallbackAdapter.java:232)
    at Unknown.MWb(Request.java:258)
    at Unknown.qXb(RequestBuilder.java:412)
    at Unknown.anonymous(XMLHttpRequest.java:351)
    at Unknown.eBb(Impl.java:189)
    at Unknown.hBb(Impl.java:242)
    at Unknown.anonymous(Impl.java:70)
"

Here's what a successful call to modelGetTemplates looks like:

[14:37:24.933] "(-:-) 2014-04-03 14:37:24,932 [ERROR] modelingGetTemplates - ModelingTemplatesDropdown - SUCCESS RETURNED: [Advanced Business Application, Advanced Business Transaction, TestTemplate]
"

I use vanilla GWT-RPC. I only have a class that extends AsyncWrapper for logging. I also created a queue for myself on the client side, which limits the number of concurrent calls to 4, but even this happens.

Version: GWT: 2.5.1 and I also use Sencha GXT, not sure which is relevant.

Here is a video reproducing the problem - at 0:30 - this time another call receives an object from the GetTemplates simulation.

The end result is that my widget gets stuck on loading, waiting for data forever. And of course, angry users :)

+4
1

, , , :) ( )

GWT RPC . RPC, , , ( , ) .

. , , . , 200 .

, , () . , .

:

, GWT , , , , , .

0

Source: https://habr.com/ru/post/1534821/


All Articles