gautamaino / gwteventservice

Automatically exported from code.google.com/p/gwteventservice
Other
0 stars 0 forks source link

Event dropped if added during gwt-rpc--processing #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If we add an event via

    void de.novanic.eventservice.service.EventExecutorService.addEvent(Domain paramDomain, Event paramEvent)

while currently in a gwt-rpc call on the servlet, the event is lost/dropped and

    void de.novanic.eventservice.client.event.listener.RemoteEventListener.apply(Event paramEvent)

is not called.

Workaround is to start a thread and add the event a second later to ensure 
http-response of previous gwt-rpcall is done.

Is this a bug or known limitation?

eventservice.properties
=====================

    # Configuration for GWTEventService

    # Time to wait at maximum (canceled when an event occurred)
    eventservice.time.waiting.max=20000

    # Time to wait at minimum (even when events have already occurred)
    eventservice.time.waiting.min=0

    # Time till timeout (when the time is reached, the user will be removed from listening for events)
    eventservice.time.timeout=90000

I enabled logging but could not see any strange things there.

    02.09.2011 13:17:09 de.novanic.eventservice.logger.DefaultServerLogger log
    AM FEINSTEN: Server: Event "myUpdateEvent@1b848c7" added to domain "829783".
    02.09.2011 13:17:09 de.novanic.eventservice.logger.DefaultServerLogger log
    AM FEINSTEN: Server: myUpdateEvent@1b848c7 for user "1hwymsyuex35c".

Original issue reported on code.google.com by Tim.Bega...@gmail.com on 26 Sep 2011 at 12:00

GoogleCodeExporter commented 8 years ago
No that isn't a normal behavior and is a normal case which is also working. For 
example the DemoConversationApp starts a GWT-RPC call to a service which adds 
an event. Therefore the event is added while the GWT-RPC call is still executed 
(and another GWT-RPC call is currently used for the event listening). No 
problems do occur.

Your attached log does  also show that the event is correctly added and 
transfering to the client side. Are there any differences with your scenario 
compared with the DemoConversationApp or other common cases which I haven't 
mentioned?

Original comment by sven.strohschein@googlemail.com on 27 Sep 2011 at 9:34

GoogleCodeExporter commented 8 years ago
Marked as invalid because there is no response since 2 - 3 weeks and probably 
it is a mistake regarding the usage.

Original comment by sven.strohschein@googlemail.com on 23 Oct 2011 at 12:14

GoogleCodeExporter commented 8 years ago
Well, that issue seems to be quite old, but I discovered similar behavior:
After "registering" for a domain, I immediately trigger an event by calling an 
RPC method. That event is not received by the registering client.

Since the event IS actually triggered and received by other, earlier registered 
clients, I assume the problem can be reduced to the network latency. But if you 
only test with one client, it looks like the event is lost/dropped.

Original comment by Maurice.Laboureur on 11 Sep 2012 at 9:48

GoogleCodeExporter commented 8 years ago
Hi Maurice,

There is an async callback parameter for all register methods for this case. To 
ensure that the event can be received by the registering client, you could add 
the event when the onSuccess-Method of the register callback is executed (-> 
when the registration is complete).

Original comment by sven.strohschein@googlemail.com on 11 Sep 2012 at 5:36