[Dolphin] Re: Problems with BlindCommandBatcher

Dierk König Dierk König
Mon, 6 Apr 2015 17:43:23 +0200


Cool! Thanks for the great example!
I will link to it from website.

cheers
Dierk 

> Am 05.04.2015 um 15:22 schrieb helmutATwork . =
<helmut.at.work@gmail.com>:
> 
> Happy Easter!
> 
> Thanks to Dierk I resolved my problem (Exception).
> 
> I have misunderstood the behaviour of the BlindCommandBatcher. It only =
works for ValueChangedCommands.
> Instead of sending Commands for every value Dierk suggested to use  =
"...clientDolphin.getClientModelStore().withPresentationModel(...)"
> 
> Because I couldn't find a an java example that fits my needs (maven =
java8) I pushed my code to github. Perhaps someone find it useful.
> @Dierk I was unsure if my sample match the project structure in the =
canoo repro, so I pushed it to my own repro.
> https://github.com/helmut-at-work/OpenDolphin_Maven_Java_Demo
> 
> Here are the part that causes the Exception (including the fix):
> =
https://github.com/helmut-at-work/OpenDolphin_Maven_Java_Demo/blob/master/=
clientlazy/src/main/java/org/opendolphin/mvndemo/clientlazy/DemoController.java#L158-175
> 
> Greetings Helmut
> 
> 
> 
> 
> 
> 
> 2015-04-01 9:18 GMT+02:00 helmut.at.work <helmut.at.work@gmail.com>:
> Hello,
> 
> I played around with the lazy loading feature.
> I'm using JDK8  Java and Maven (sorry no Groovy knowledge)
> I was able to refactor the "LazyLoadingView" to Java. All worked as =
expected. (OpenDolphin rocks :)
> 
> Now I add some more Columns and changed the defferMillis value of the =
Batcher to see the performance impact.
>                                BlindCommandBatcher batcher = new =
BlindCommandBatcher();
>                                batcher.setDeferMillis(1000);
>                                batcher.setMergeValueChanges(true);
> 
> Exception "There already is a presentation model with id '6142' known =
to the client." if I scroll down the table.
> It only occurs with a value > 50.
> Any Ideas?
> 
> Greetings Helmut
> 
> 
> Exception in thread "JavaFX Application Thread" =
java.lang.IllegalStateException: There already is a presentation model with id '6142' known to the client.
>                 at =
org.opendolphin.core.client.comm.ClientConnector.handle(ClientConnector.groovy:190)
>                 at =
org.opendolphin.core.client.comm.ClientConnector$handle$1.callCurrent(Unknown Source)
>                 at =
org.opendolphin.core.client.comm.ClientConnector.dispatchHandle(ClientConnector.groovy:139)
>                 at =
org.opendolphin.core.client.comm.ClientConnector.processResults(ClientConnector.groovy:120)
>                 at =
sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
>                 at =
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                 at java.lang.reflect.Method.invoke(Method.java:483)
>                 at =
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>                 at =
groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>                 at =
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:368)
>                 at =
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
>                 at =
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
>                 at =
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
>                 at =
org.opendolphin.core.client.comm.ClientConnector$_startCommandProcessing_closure3_closure12.doCall(ClientConnector.groovy:85)
>                 at =
org.opendolphin.core.client.comm.ClientConnector$_startCommandProcessing_closure3_closure12.doCall(ClientConnector.groovy)
>                 at =
sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
>                 at =
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>                 at java.lang.reflect.Method.invoke(Method.java:483)
>                 at =
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>                 at =
groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
>                 at =
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:278)
>                 at =
groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
>                 at groovy.lang.Closure.call(Closure.java:423)
>                 at groovy.lang.Closure.call(Closure.java:417)
>                 at groovy.lang.Closure.run(Closure.java:504)
>                 at =
com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
>                 at =
com.sun.javafx.application.PlatformImpl$$Lambda$48/1597563532.run(Unknown Source)
>                 at java.security.AccessController.doPrivileged(Native =
Method)
>                 at =
com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
>                 at =
com.sun.javafx.application.PlatformImpl$$Lambda$47/2052454759.run(Unknown Source)
>                 at =
com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
>                 at com.sun.glass.ui.win.WinApplication._runLoop(Native =
Method)
>                 at =
com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
>                 at =
com.sun.glass.ui.win.WinApplication$$Lambda$38/471952006.run(Unknown Source)
>                 at java.lang.Thread.run(Thread.java:745)
> 
> 
> 
> 
>