First off I've been testing the MapStoreProvider using a (dojo) DataGrid. The problem I see with MapStoreProvider is the way is tracks who is subscribe to the store. This problem starts with the client sending a value for dwrRefBy (is this to keep track of what callback to call on the return?) which is different for each request. So when you sort the grid it fires off the fetch function and a new dwrRefById gets generated. This Id ends up being the listener Id for the StoreChangeListener, by the help of ProxyInterfaceConverter and DefaultJavaScriptObject. Since the Id isn't the same for each page the map of watched / watchers never get cleaned up correct on new subscriptions. Shouldn't the listener be using the scriptSessionId (this the correct name?) to track what page (tab / browser) is asking for a subscription? I tried hacking equals() and hashCode() in DefaultJavascriptObject to only pay attention to the session id but I think this has side effects that I don't understand. I'm I correct in think that the class the ProxyInterfaceConverter uses, DefaultJavascriptObject in this case, need to correctly implement equals() and hashCode() has StoreChangeListener is only an interface? This problem causes a memory leak and to have the same client notified multiple time on a store onChange and onDelete.
First off I've been testing the MapStoreProvider using a (dojo) DataGrid. The problem I see with MapStoreProvider is the way is tracks who is subscribe to the store. This problem starts with the client sending a value for dwrRefBy (is this to keep track of what callback to call on the return?) which is different for each request. So when you sort the grid it fires off the fetch function and a new dwrRefById gets generated. This Id ends up being the listener Id for the StoreChangeListener, by the help of ProxyInterfaceConverter and DefaultJavaScriptObject. Since the Id isn't the same for each page the map of watched / watchers never get cleaned up correct on new subscriptions. Shouldn't the listener be using the scriptSessionId (this the correct name?) to track what page (tab / browser) is asking for a subscription? I tried hacking equals() and hashCode() in DefaultJavascriptObject to only pay attention to the session id but I think this has side effects that I don't understand. I'm I correct in think that the class the ProxyInterfaceConverter uses, DefaultJavascriptObject in this case, need to correctly implement equals() and hashCode() has StoreChangeListener is only an interface? This problem causes a memory leak and to have the same client notified multiple time on a store onChange and onDelete.