tomasbilek / gwteventservice

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

Using Generator for unique client ids break the connection #38

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Using and changing very little bit the HelloGWTEventService
1. theRemoteEventService.addListener(domain, remoteEventListener);
2. theRemoteEventService.removeListener(domain, remoteEventListener);
3. theRemoteEventService.addListener(domain, remoteEventListener);

What is the expected output? 
1. listner is added and receives callback in implemented methd  public void 
apply(Event anEvent)

2. listner is removed

3. listner is re-added and and receives callback in implemented methd  public 
void apply(Event anEvent)

What do you see instead?
If the property eventservice.connection.id.generator is not set, toggle 
addListener / removeListener it works fine, but if the property 
eventservice.connection.id.generator is set as 
=de.novanic.eventservice.service.connection.id.SessionExtendedConnectionIdGenera
tor then it happens:

1. listner is added and receives callback in implemented methd  public void 
apply(Event anEvent)

2. listner is removed

3. listner is re-added and and does not receive callback in implemented methd 
public void apply(Event anEvent)

What version of the product are you using? 
GWT 2.4, gwteventservice latest trunk

On what operating system?
XP, Windows 7, any browser

Please provide any additional information below.

After some tests I found that
when eventservice.connection.id.generator is set as 
=de.novanic.eventservice.service.connection.id.SessionExtendedConnectionIdGenera
tor and I add some listner and I try add/remove/add then it works fine in any 
case, only when I remove last listner and then re-add first listner then the 
server stops to notify, in short when 
theRemoteEventService.getRegisteredListeners(domain).size() > 0 add/remove/add 
it works fine, as soon as the 
theRemoteEventService.getRegisteredListeners(domain).size() == 0 the first and 
subsequent addListener do not work.

Best Regards

Original issue reported on code.google.com by vlui...@tiscali.it on 29 Sep 2011 at 7:36

GoogleCodeExporter commented 8 years ago
Thank you for the issue report. I could reproduce and now fix this problem with 
your issue description. It is fixed in the trunk version and also with the 
upcoming 1.2 release candidate.

Original comment by sven.strohschein@googlemail.com on 2 Oct 2011 at 7:58

GoogleCodeExporter commented 8 years ago
Cool gwteventservice is truly versatile and at moment it reached a remarkable 
level of maturity, thank you for the excellent work.  

Original comment by vlui...@tiscali.it on 3 Oct 2011 at 8:09

GoogleCodeExporter commented 8 years ago
Is it possible you forgot the special case with domain == null ?

When I remove/re-add a listener on the NULL domain (for receiving user specific 
events), it doesn't work anymore! It does for a non-null domain, confirming the 
fix!

More info:
http://gwteventservice.freeforums.org/possible-bug-similar-to-issue-38-t114.html

Original comment by jere...@gmail.com on 6 Oct 2012 at 10:10